Building load modification responsive to utility grid events using robotic process automation

ABSTRACT

Responding to grid events is provided. The system determines, based on an event, to modify an electrical load of a site. The system selects a parameter for the site to adjust to modify the electrical load. The system identifies a script constructed from previously processed interactions between a human-machine interface of the building management system to adjust the parameter for the site. The system establishes a communication session with a remote access agent executed by a computing device of the site to invoke the building management system of the site. The system generates a sequence of commands defined by the script to adjust the one or more parameters for the site. The system transmits the sequence of commands to cause the remote access agent to execute the sequence of commands on the human-machine interface of the building management system to modify the electrical load of the site.

BACKGROUND

A building can receive utilities, such as electric power, from a utilityprovider over a utility distribution grid. Devices, components, ormachines located at the building can consume various amounts of autility, such as electric power, at various times. Due to supplyconstraints of a utility, or the amount of a utility that can besupplied at a specific time interval, it may be desirable to modify theutility load at a building for a specific time interval. However, due tothe large number and different types of devices consuming a utility atthe building, it can be challenging to efficiently and effectivelymodify utility consumption at the building for a time interval.

SUMMARY

Systems and methods of this technical solution are generally directed toresponding to grid events by modifying a load at a building usingrobotic process automation. Due to increased electricity demand ordecreased electricity supply on an electric distribution grid, it may bebeneficial to modify or reduce the consumption of electricity at abuilding during a time period. For example, there may be increaseddemand for electricity during particular times in the day or responsiveto particular grid events. However, it can be challenging to modify orreduce the consumption of electricity at a building responsive to thegrid event, or proactively modify or reduce the consumption ofelectricity at the building ahead of the grid event, because of thelarge number of different types of devices or components at the buildingthat consume electricity, or other utility, and the interactions betweenthe different devices or components and their impacts on the buildingenvironment.

For example, a building management system (“BMS”) or a buildingautomation system can manage, control or monitor mechanical andelectrical equipment, components or devices at a building, such asheating, ventilation, air conditioning, lighting, power systems,elevator systems, fire systems, or security systems. The buildingmanagement system can include software and hardware and provide a userinterface to manage the mechanical and electrical equipment at abuilding. However, it can be challenging to interface with a BMS toadjust or reduce the load at a building because of the complex userinterfaces or application programming interfaces (“APIs”) of differentBMSs and the custom configurations at each building. For example, eachbuilding can have a custom or specific configuration with regard totypes of electrical and mechanical equipment, and how the electrical andmechanical equipment impacts the building environment (e.g., heating orcooling a particular room at a particular time of day). Thus, it can bechallenging to setup or configure a system to automatically respond to agrid event by reducing the load in a particular building.

Systems and methods of this technical solution can modify the load at abuilding in response to a grid event by using robotic processautomation. This technical solution can simplify the process ofautomating or controlling a BMS to respond to grid event by generatingscripts based on recording user interactions with a user interface ofthe BMS of a building, and then executing a particular script inresponse to a grid event. The technical solution can receive data fromvarious sensors located at the building, as well as remote data sources,in order to determine or identify the grid event and select a scriptwith commands to execute. The script of this technical solution canestablish a remote access connection with a client computing device ofthe building, then launch the user interface of the BMS previouslyconfigured for the building, and then perform a sequence of actions tocontrol the BMS via the user interface. By remotely accessing the userinterface of the BMS to control the BMS, this technical solution canreduce the complexity and amount of time needed to establish automaticload reduction at a building in response to a grid event, therebyincreasing energy efficiency and reducing energy consumption of abuilding.

An aspect of this technical solution can be directed to a system torespond to electric events. The system can include a data processingsystem having memory and one or more processors. The data processingsystem can determine, based on an event, to modify an electrical load ofa site. The electrical load can be managed by a building managementsystem separate from the data processing system. The data processingsystem can select, responsive to the determination to modify theelectrical load, one or more parameters for the site to adjust to modifythe electrical load. The data processing system can identify, based onthe one or more parameters, a script constructed from previouslyprocessed interactions between a human-machine interface of the buildingmanagement system to adjust the one or more parameters for the site. Thedata processing system can establish, via a network, a communicationsession with a remote access agent executed by a computing device of thesite to invoke the building management system of the site. The dataprocessing system can generate a sequence of commands defined by thescript that adjust the one or more parameters for the site to modify theelectrical load of the site. The data processing system can transmit,via the communication session to the remote access agent executed by thecomputing device of the site, the sequence of commands. The sequence ofcommands can cause the remote access agent to execute the sequence ofcommands on the human-machine interface of the building managementsystem to modify the electrical load of the site.

An aspect of this technical solution can be directed to a method ofresponding to electric events. The method can be performed by a dataprocessing system having memory and one or more processors. The methodcan include the data processing system determining, based on an event,to modify an electrical load of a site. The electrical load of the sitecan be managed by a building management system separate from the dataprocessing system. The method can include the data processing systemselecting, responsive to the determination to modify the electricalload, one or more parameters for the site to adjust to modify theelectrical load. The method can include the data processing systemidentifying, based on the one or more parameters, a script constructedfrom previously processed interactions between a human-machine interfaceof the building management system to adjust the one or more parametersfor the site. The method can include the data processing systemestablishing, via a network, a communication session with a remoteaccess agent executed by a computing device of the site to invoke thebuilding management system of the site. The method can include the dataprocessing system generating a sequence of commands defined by thescript that adjust the one or more parameters for the site to modify theelectrical load of the site. The method can include the data processingsystem transmitting, via the communication session to the remote accessagent executed by the computing device of the site. The sequence ofcommands can cause the remote access agent to execute the sequence ofcommands on the human-machine interface of the building managementsystem to modify the electrical load of the site.

An aspect of this technical solution can be directed to a system torespond to electric events. The system can include a data processingsystem having memory and one or more processors. The data processingsystem can receive a site identifier for a site managed by a buildingmanagement system separate from the data processing system. The site caninclude a computing device used to control the building managementsystem via a human-machine interface of the building management system.The data processing system can identify a plurality of sensors installedat the site. The plurality of sensors can transmit data to the dataprocessing system. The data processing system can determine, based on aconfiguration of the building management system and the plurality ofsensors installed at the site, a plurality of events for the site. Thedata processing system can detect, responsive to a first event in theplurality of events, a sequence of interactions to control one or moreparameters of the building management system via the human-machineinterface. The data processing system can configure a script based onthe sequence of interactions. The script can i) establish acommunication session with the computing device, ii) invoke the buildingmanagement system, and iii) execute the sequence of interactions via thehuman-machine interface of the building management system. The dataprocessing system can generate, based on the first event, a trigger forthe script to cause execution of the script responsive to the firstevent.

An aspect of this technical solution is directed to a method ofresponding to electric events. The method can be performed by a dataprocessing system having memory and one or more processors. The methodcan include the data processing system receiving a site identifier for asite managed by a building management system separate from the dataprocessing system. The site can include a computing device used tocontrol the building management system via a human-machine interface ofthe building management system. The method can include the dataprocessing system identifying a plurality of sensors installed at thesite. The plurality of sensors can transmit data to the data processingsystem. The method can include the data processing system determining,based on a configuration of the building management system and theplurality of sensors installed at the site, a plurality of events forthe site. The method can include the data processing system detecting,responsive to a first event in the plurality of events, a sequence ofinteractions to control one or more parameters of the buildingmanagement system via the human-machine interface. The method caninclude the data processing system configuring a script based on thesequence of interactions. The script can i) establish a communicationsession with the computing device, ii) invoke the building managementsystem, and iii) execute the sequence of interactions via thehuman-machine interface of the building management system. The methodcan include the data processing system generating, based on the firstevent, a trigger for the script to cause execution of the scriptresponsive to the first event.

These and other aspects and implementations are discussed in detailbelow. The foregoing information and the following detailed descriptioninclude illustrative examples of various aspects and implementations,and provide an overview or framework for understanding the nature andcharacter of the claimed aspects and implementations. The drawingsprovide illustration and a further understanding of the various aspectsand implementations, and are incorporated in and constitute a part ofthis specification.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings are not intended to be drawn to scale. Likereference numbers and designations in the various drawings indicate likeelements. For purposes of clarity, not every component may be labeled inevery drawing. In the drawings:

FIG. 1 is an illustration of an example system to respond to gridevents, in accordance with an implementation.

FIG. 2 is an illustration of an example operational flow for generatinga script for responding to grid events, in accordance with animplementation.

FIG. 3 is an illustration of an example operational flow for respondingto grid events using a script, in accordance with an implementation.

FIG. 4. is an illustration of an example method for generating a scriptfor responding to grid events, in accordance with an implementation.

FIG. 5 is an illustration of an example method for responding to gridevents, in accordance with an implementation.

FIG. 6 is an illustration of an example method for generating script forresponding to grid events, in accordance with an implementation.

FIG. 7 is a block diagram illustrating an architecture for a computersystem that can be employed to implement elements of the systems andmethods described and illustrated herein, including, for example, thesystem depicted in FIG. 1 and the operational flows or methods depictedin FIGS. 2-6.

DETAILED DESCRIPTION

Following below are more detailed descriptions of various conceptsrelated to, and implementations of, methods, apparatuses, and systems ofresponding to grid events. The various concepts introduced above anddiscussed in greater detail below may be implemented in any of numerousways.

Systems and methods of this technical solution are generally directed toresponding to grid events by reducing a load at a building using roboticprocess automation. There can be many scenarios in which an operator ofa site, such as a commercial or residential building or structure, maywant to modify the load of a building to modify or reduce energy demandduring moments of peak demand or to provide grid services. The load canrefer to the consumption of a utility provided via a utilitydistribution grid, such as electricity provided via an electricitydistribution grid. Further, sites can respond to grid events bymodifying the load of the site. There can be various instances in whichit may be beneficial for a site to modify its load. For example, abuilding can respond to a grid event by reducing energy use for a setperiod of time due to either a demand response event (e.g., a change inthe power consumption of the site to better match the demand for powerwith the supply of power) on the grid, or to avoid high demand chargesarising from an increase in energy demand on the grid relative to energysupply. For example, automating a fresh air intake of a building can bebased on matching the outside temperature with a servo motor to open avent a particular amount.

However, it can be challenging for a building to modify its load in anefficient and effective manner in response to a grid event or otherevent without negatively impacting an environment of the site (e.g.,heating or cooling or other machinery on the site). For example,manually changing a temperature set point, fan speed or other parameterdirectly into a BMS can be tedious, cumbersome, error prone, orintroduce excessive delay, thereby preventing the site from realizingthe desired energy savings in a timely manner. It can also be tedious,cumbersome, and error prone to generate a single command that automatesa sequence of commands in the BMS to automatically modify or reduce theload. For example, it may take 6 months to implement a system that takesa single command and generates a sequence of commands to input into aBMS to reduce load, which can result in a loss of energy reductions for6 months in which the system is not yet in place. Further, any changesto the site can introduce several more months to update the sequence ofcommands to modify or reduce load. This can be because hundreds orthousands of data points and parameters may be mapped via an applicationprogramming interface (“API”), which can be particularly challengingwith older BMSs that have rudimentary APIs, proprietary APIs, or in manycases no API whatsoever. Thus, it may be challenging to efficientlyscale up load reduction processes for a particular site or multiplesites as the number of elements to control increase or the number ofevents increase.

Sites or buildings can respond to grid events using a demand responseprogram. A demand response program can be based on a utility notifyingthe site of when the grid event is to occur, so that the site can modifyits load. Sites or building can respond to grid events corresponding toperiods of high energy prices, demand charges (e.g., extra fees appliedto electric bills based upon the highest amount of power drawn duringany time interval, such as 15 minutes, during a billing period) assessedby the utility provider for the site, or based on greenhouse gasoptimization for when polluting power plants (e.g., natural gas peakingpower plants) are brought online when there is high demand on the grid.However, there can be different types of grid events where the utilityprovider may not provide any notice, including, for example, coincidentpeak events, or other periods of abnormally high energy demand. In thesescenarios, it may be possible to forecast or predict occurrences of gridevents or higher energy demand relative to supply. When there is higherenergy demand relative to supply, the efficiency of the utility orelectric distribution grid may be reduced, or the price per unit ofenergy may increase. For grids that provide a dynamic pricing model thatincentives sites to modify energy consumption based on energy supply,sites can dynamically modify their energy demand or participate in awhole sale energy market to facilitate efficiencies on the grid. Thus,to participate in a whole sale energy market or otherwise improve gridenergy distribution efficiencies, a site can quickly modify its load toreduce load during grid events without sacrificing tenant comfort.

Systems and methods of this technical solution are generally directed toresponding to grid events by reducing a load at a building using roboticprocess automation (“RPA”). Using RPA can simplify the process ofautomating BMS to respond to grid events. RPA can refer to or include asoftware “robot” application that can replicate human-computerinteractions. This technical solution, using RPA, can mimic actionstaken by the human operators of the BMS, such as button clicks on ahuman-machine interface, to respond to grid events in real-time (e.g.,within 1 second, 2 seconds, 5 seconds, 10 seconds, 1 minute, 5 minutes,10 minutes or other time interval of receiving an indication of anoccurrence of a grid event). The technical solution can automatesequences of actions within a BMS to perform repeatable tasks that maynot use operator judgement and have known constraints and conditionsthat affect the site.

For example, the site can receive a signal from a utility or otherthird-party indicating when to enact a sequence in the BMS. The site canreceive the signal at a specified time prior to a demand response eventfrom the utility or an aggregator. The site can implement the sequenceof commands at a corresponding time, putting into action a series ofmeasures configured to reduce the load within the building.

In implementations, this technical solution can be integrated withmachine learning forecasting to predict a grid event or otheropportunity to modify a load of the site. Based on this forecast, thetechnical solution an generate or trigger a command based on a predictedgrid event (e.g., a coincident peak event) to modify the load of thebuilding using the sequence of actions generated via RPA. In anotherconfiguration of the invention the RPA process can be integrated withmachine learning forecasting for greater automation.

The systems and methods of this technical solution can modify or reducea load at a site while maintaining the performance at the site, such astenant comfort, by adding conditional actions. For example, if a spaceat the site is to be maintained between a lower and upper boundtemperature threshold and there is an instruction to reduce load duringa specific time period, the system can pre-cool (or pre-heat) the space,subject to the conditions that temperature sensors throughout thebuilding stay within the predetermined bounds. Similarly, during theload reduction period the temperature setpoints can be raised (orlowered) subject to the condition that the setpoints stay within adesired temperature range.

To do so, this technical solution can identify a configuration of asite, including the types of electrical and mechanical equipment at thesite, what sensors are deployed for the site, what third-party data isavailable for the site, and constraints for the site. Third-party datacan include, for example, whether information, demand responsenotifications, sunlight conditions, etc. Constraints can include minimumor maximum temperature settings for a space, for example, and can becustomized for the site. The technical solution can then determine oridentify types of events responsive to which a sequence of commands canbe initiated to modify load of the site. For example, if the siteincludes a space with an occupancy sensor, then a type of event andsequence of actions can include: if the occupancy is less than fivepeople in the space, then decrease the airflow for that space bylowering a damper to a particular level. The technical solution can thenrecord (e.g., using a macro recorder) the operator using the BMS via thegraphical user interface (“GUI”) of the BMS to lower the damper to thedesired level in response to the event (e.g., detecting occupancy forthe space is less than 5 people). The system can record the operatingperforming the sequence of actions for each type of event at the site.

The technical solution can process the recordings to generate a scriptwith a sequence of commands or actions. The technical solution canintegrate exception handling into the sequence of actions to improvereliability. For example, when an operator interacts with the GUI of theBMS, an unrelated prompt or window can be rendered in the foreground,obfuscating the GUI of the BMS while a sequence of actions are beingexecuted. This can result in an incorrect or incomplete interaction withthe BMS, which can cause the BMS to not adjust the load or inadvertentlyincrease the load of the building. However, this technical solution canbe configured to detect the unrelated prompt by performing a screencapture on the client device rendering the GUI of the BMS, and comparingthe state of the screen with a desired state using, for example, imagerecognition, prior to executing an interaction with the BMS, therebyperforming exception handling and mitigating or preventing erroneousoperation of the BMS. The script can be configured to handle varioustypes of exceptions in order to create a robust and reliable script.

The technical solution can validate the script by determining whetherthe script achieves the desired objective, such as reducing the load ofthe site. The system can measure the load, energy use, or otherparameters (e.g., heating, cooling, or ventilation) of the buildingprior to executing the script, and compare the load or energyconsumption of the building subsequent to execution of the script tovalidate whether the script achieves the desired objective whilesatisfying the constraints or conditions (e.g., within minimum andmaximum temperature setpoints). For example, the system can confirmwhether the power consumption of the site is less when the damper hasbeen reduced by a certain percentage while maintaining the desiredairflow or temperature of a particular space. If the script isvalidated, then the system can activate the script for the correspondingevent. However, if the script does not reduce power consumption orsatisfy the desired constraints such as temperature or airflow for thespace, the system can determine not to activate the script.

Once the script has been generated, validated and activated, the systemcan execute the script responsive to a grid event or other trigger,condition, forecast, or instruction. To do so, the system can detect theevent and then select the script responsive to the event. The system canremotely access a client device at the site using a remote access agent.The system can launch the BMS to bring the GUI of the BMS to theforeground. The system can execute the script to perform the sequence ofinteractions with the GUI of the BMS. The system can then terminate theconnection upon completion of the script.

FIG. 1 illustrates an example system 100 to respond to grid events. Thesystem 100 can include a data processing system 102. The data processingsystem 102 can communicate with one or more sensors 134, client devices130, building management systems (“BMS”) 132, or remote data sources 144via a network 101. The network 101 can include computer networks such asthe Internet, local, wide, metro, or other area networks, intranets,satellite networks, and other communication networks such as voice ordata mobile telephone networks. The network 101 can be used to accessinformation resources such as web pages, web sites, streaming resources,data feeds, domain names, or uniform resource locators that can be usedto facilitate responding to grid events.

The network 101 can be used by the data processing system 102 tocommunicate, interface with, or receive information from one or moresensors 134, client devices 130, BMS 132, or remote data sources 144.For example, the data processing system 102 can establish acommunication session with the client device 130 to control the clientdevice 130. In another example, the data processing system 102 canreceive data, measurements, or other information from sensors 134 viathe network 101. In yet another example, the data processing system 102can receive data from the remote data source 144 such as weatherinformation, solar intensity information, or demand responseinformation.

The network 101 may be any type or form of network and may include anyof the following: a point-to-point network, a broadcast network, a widearea network, a local area network, a telecommunications network, a datacommunication network, a computer network, an ATM (Asynchronous TransferMode) network, a SONET (Synchronous Optical Network) network, a SDH(Synchronous Digital Hierarchy) network, a wireless network and awireline network. The network 101 may include a wireless link, such asan infrared channel or satellite band. The topology of the network 101may include a bus, star, or ring network topology. The network mayinclude mobile telephone networks using any protocol or protocols usedto communicate among mobile devices, including advanced mobile phoneprotocol (“AMPS”), time division multiple access (“TDMA”), code-divisionmultiple access (“CDMA”), global system for mobile communication(“GSM”), general packet radio services (“GPRS”) or universal mobiletelecommunications system (“UMTS”). Different types of data may betransmitted via different protocols, or the same types of data may betransmitted via different protocols.

The system 100 can include at least one data processing system 102. Thedata processing system 102 can include at least one logic device such asa computing device having one or more processors to communicate via thenetwork 101, for example with the sensors 134, client device 130, BMS132, or remote data source 144. The data processing system 102 caninclude at least one computation resource, server, processor or memory.For example, the data processing system 102 can include a plurality ofcomputation resources or servers located in at least one data center.The data processing system 102 can include multiple, logically-groupedservers and facilitate distributed computing techniques. The logicalgroup of servers may be referred to as a data center, cloud computingenvironment, cloud server, server farm or a machine farm. The serverscan also be geographically dispersed. A data center or machine farm maybe administered as a single entity, or the machine farm can include aplurality of machine farms. The servers within each machine farm can beheterogeneous—one or more of the servers or machines can operateaccording to one or more type of operating system platform.

Servers in the machine farm can be stored in high-density rack systems,along with associated storage systems, and located in an enterprise datacenter. For example, consolidating the servers in this way may improvesystem manageability, data security, the physical security of thesystem, and system performance by locating servers and high performancestorage systems on localized high performance networks. Centralizationof all or some of the data processing system 102 components, includingservers and storage systems, and coupling them with advanced systemmanagement tools allows more efficient use of server resources, whichsaves power and processing requirements and reduces bandwidth usage.

The system 100 can include, access, or otherwise interact with at leastone remote data source 144. The remote data source 144 can bemaintained, administered or otherwise managed by a third-party entitythat is different from the entity that maintains, administers orotherwise manages the data processing system 102. The remote data source144 can be maintained, administered or otherwise managed by athird-party entity that is different from the entity that maintains,administers or otherwise manages the client device 130. The remote datasource 144 can be maintained, administered or otherwise managed by athird-party entity that is different from the entity that maintains,administers or otherwise manages the BMS 132. An entity can refer tocompany, organization, or individual. A third-party entity can refer toan entity that is different from the entity that administers the dataprocessing system 102.

The remote data source 144 can include, for example, a utility providerentity. A utility can be electricity, and the utility provider can be anelectric power company or entity that generates or distributeselectricity to customer sites 142. A customer site 142 can refer to orinclude one or more buildings, campuses, lots, studios, complexes,warehouses, or other man-made structures that consume the utility. Forexample, the customer site 142 can include commercial or residentialbuildings, such as an office building or an apartment building. The site142 can be located at a geographic area and have an address, location,latitude and longitude. The site 142 can be associated with a uniqueidentifier, such as a building identifier (e.g., an alphanumericidentifier). The site 142 can receive the utility via a utilitydistribution grid, such as an electricity distribution grid, from theutility provider. The remote data source 144 (e.g., utility provider)can provide information about the utility, such as an indication ofsupply versus demand, price per unit of energy, price per unit of energyduring a time interval, demand response events, or other informationthat the data processing system 102 can use to identify a grid event andtrigger a response to the grid event.

Remote data source 144 can include, for example, a weather informationprovider. The weather information provider can provide weatherinformation for the geographic location at which the site 142 islocated. Weather information can include the current or forecastedweather, temperature, winds, precipitation, or sun intensity.

The remote data source 144 can include a utility aggregator entity, suchas an electric aggregator entity. The electric aggregator can gatherconsumer sites 142 for the purpose of establishing a rate for thegeneration of the electricity service form an electric supplier. Thedata processing system 102 can receive rate information from theelectric aggregator via network 101, such as price per kilowatt hour(“kWh”).

The system 100 can include or interface with one or more sensors 134.The sensors 134 can be located at or throughout the site 142. Thesensors 134 can be located at one or more spaces, regions, or locationswithin a site 142, such as different rooms within a building. Eachsensors 134 can be assigned or associated with a unique identifier thatcan indicate the type of sensors, site 142 information, or location orregion in which the sensor 134 is located.

The sensors 134 can be of any type and be designed, constructed oroperational to measure, detect or otherwise provide information to thedata processing system 102 that facilitates identifying or responding togrid events. Sensors 134 can include, for example, temperature sensors,ambient temperature sensors, occupancy sensors (e.g., whether room isoccupied by people or the number of people in a room), proximitysensors, humidity sensors, air quality sensors, carbon dioxide sensors,carbon monoxide sensors, or ambient light sensors. The site 142 caninclude sensors 134 that can detect, sense or otherwise informationassociated with the BMS 132. For example, the sensors 134 can determinedamper levels, actuator levels, fan speed, heating element level,cooling element level, window open or closed, shades open or closed, orwhether the lights on or off.

The sensor 134 can include an electric meter for the site 142. Theelectric meter sensor can measure, determine, or otherwise identify theamount of electricity consumed by the site 142. The amount ofelectricity consumed by the site 142 can be referred to as the totalelectric load of the site 142. The electric meter can measure theelectric load with units of kilowatts. The electric meter can furtherindicate electricity consumption over a period of time in kilowatthours. The site 142 can include an electric meter provided by theutility provider, in which case the data processing system 102 canreceive the electric load information from the electric meter providedby the utility provider. In some cases, the site 142 can include anadditional or different electric meter sensor 134 configured to transmitreal-time electric load information to the data processing system 102.

The system 100 can include, interface with or otherwise access abuilding management system (“BMS”) 132. The BMS 132 can manage, control,or monitor electrical or mechanical elements or components within a site142. The BMS 132 can include or refer to building automation system. TheBMS 132 can be a computer-based control system installed at the site 142that controls and monitors the site's mechanical and electricalequipment such as ventilation, lighting, power systems, fire systems,and security systems. The BMS 132 can be configured in any manner anduse any proprietary or non-proprietary protocol, including, for example,C-Bus or Profibus. The BMS 132 can integrate the use of Internetprotocols and open standards such as DeviceNet, SOAP, XML, BACnet,LonWorks, Modbus or KNX.

The BMS 132 can be associated with a large percentage of the sites 142energy use. For example, the BMS 132 can be responsible or represent30%, 40%, 50%, 60%, 70% or more of the energy used at a site 142. Forexample, the BMS 132 can control or monitor heating, cooling,ventilation, lighting, security systems, fire systems, elevator systems,or access control (e.g., turnstiles or doors) of a site 142.

While the BMS 132 can be configured to control electrical or mechanicalequipment at the site 142, the BMS 132 may or may not be located at thesite 142 itself. In implementations, the BMS 132 can be located on thesite 142, such as on one or more servers, computing devices, orprocessors located at the site 142. In implementations, the BMS 132 canexecute on a server or cloud remote from the site 142, such as at a datacenter in a central location. For example, the BMS 132 can be asoftware-as-a-service executing on a cloud or one or more servers andconfigured to manage, control, or otherwise monitor electrical andmechanical equipment at the site 142. The BMS 132 can provide aninterface, application programming interface (“API”), user interface(“UI”), or graphical user interface (“GUI”) through which a user caninteract with the BMS 132 to manage, control, or otherwise monitorelectrical and mechanical equipment at the site 142.

The client device 130 (or client computing device or computing device)can be used to access, control, interface or otherwise interact with theBMS 132. An operator, site manager, or other user can use the clientdevice 130. The client device 130 can include a desktop computer, laptopcomputer, tablet computer, smart phone, mobile telecommunication device,or portable computer. The client device 130 can include one or morecomponent depicted in FIG. 7. The client device 130 can launch, invoke,instantiate, or otherwise access a BMS interface 138, such as the UI orGUI of the BMS 132. For example, the client device 130 can include adisplay device, keyboard, mouse, touch input or other input/outputdevices controllable or accessible by a user to access the BMS 132.

The client device 130 can be located at the site 142. In some cases, theclient device 130 may not be located at the site 142. For example, theclient device 130 can be located remote from the site 142, but beconfigured to access the BMS 132 via network 101 to manage, control, ormonitor electrical or mechanical equipment at the site 142.

The client device 130 can include a remote access agent 136 designed,constructed and operational to interface or communicate with the dataprocessing system 102. The remote access agent 136 can include a daemonor background task that executes on the client device 130 in order tofacilitate remote access control of the client device 130. The remoteaccess agent 136 can be launched on startup of the client device 130 orotherwise launched or invoked on the client device 130 so as to detector receive requests, instructions or commands from the data processingsystem 102. The remote access agent 136 can interface with theconnection manager 110 of the data processing system 102. The remoteaccess agent 136 can receive commands or instructions from the dataprocessing system 102 to perform one or more actions. The actions caninclude interacting with the BMS 132 via the BMS interface 138. Forexample, the action can be to launch the BMS interface 138 and interactwith the BMS interface 138 to control a parameter or operation of theBMS 132 via the BMS interface 138.

The client device 130 can include a recorder 140 designed, constructedand operational to identify, detect, or record a sequence ofinteractions between the user of the client device 130 and the BMSinterface 138 or other components of the client device 130 via one ormore input devices (e.g., input device 730) of the client device 130(e.g., keyboard, mouse, touch interface, gestures, voice input, etc.).The recorder 140 can include a standalone macro recorder. The recorder140 can include software that can record macros. The recorder 140 candetect user input into input device of the client device 130 and recordthe type of input, sequence of the input, time stamp of the input orother information associated with the input.

The recorder 140 can detect, record, or otherwise identify output by theclient device 130. The recorder 140 can record visual output rendered bythe client device 130 on a display device (e.g., display 735) of theclient device 130. The visual output can include the BMS interface 138,such as a graphical user interface of the BMS 132. The recorder 140 cantake screenshots or snapshots of what is rendered for display by theclient device 130. The recorder 140 can assign timestamps to thescreenshots. The recorder 140 can take screenshots corresponding to theuser input. For example, the recorder 140 can take a screenshotresponsive to user input via an input device of the client device 130 inorder to correlate the input with what is displayed on the screen. Bytaking screenshots responsive to user input as opposed to continuouslyrecording what is rendered on the screen, the recorder 140 of thistechnical solution can reduce data storage, memory utilization, networkbandwidth or processor utilization when generating a script to respondto grid events.

The system 100 can include at least on data processing system 102. Thedata processing system 102 can include, interface, or otherwisecommunicate with at least one interface 104. The data processing system102 can include, interface, or otherwise communicate with at least onedata collector 106 (or data collector component). The data processingsystem 102 can include, interface, or otherwise communicate with atleast one action generator 108 (or action generator component). The dataprocessing system 102 can include, interface, or otherwise communicatewith at least one connection manager 110 (or connection managercomponent). The data processing system 102 can include, interface, orotherwise communicate with at least one remote interface controller 112(or remote interface controller component). The data processing system102 can include, interface, or otherwise communicate with at least onescript generator 114 (or script generator component). The scriptgenerator 114 can include, interface or otherwise communicate with atleast one exception handler 116 (or exception handler component 116).The data processing system 102 can include, interface or otherwisecommunicate with at least one data repository 128 (or database, orstorage device).

The interface 104, data collector 106, action generator 108, connectionmanager 110, remote interface controller 112, script generator 114,exception handler 116, and model generator 118 can each include at leastone processing unit or other logic device such as programmable logicarray engine, or module configured to communicate with the databaserepository 128 or database. The interface 104, data collector 106,action generator 108, connection manager 110, remote interfacecontroller 112, script generator 114, exception handler 116, and modelgenerator 118 can be separate components, a single component, or part ofthe data processing system 102. The system 100 and its components, suchas a data processing system 102, can include hardware elements, such asone or more processors, logic devices, or circuits.

The data repository 128 can include one or more local or distributeddatabases, and can include a database management system. The datarepository 128 can include computer data storage or memory and canstore, maintain, or manage one or more of scripts 120, site data 122,training data 124 (or training data 124), site data 122, training data124, or a model 126, among other information that can facilitateconnecting client devices with expert client devices.

The script 120 can refer to or include a sequence of actions that can beused to control the BMS 132 via the BMS interface 138 accessed by clientdevice 130. For example, the script 120 can include a sequence ofactions to launch the BMS interface 138, access a state or window of theBMS interface 138, adjust a parameter of the BMS 132 via the BMSinterface 138, and then close the BMS interface 138.

The site data 122 can include information about the site 142 thatfacilitates identifying a grid event or responding to a grid event byadjusting the amount of load utilized by the site 142. The site data 122can include, for example, one or more of: a unique site identifier, sitelocation (e.g., building address, latitude or longitude coordinates, zipcode, geopolitical boundary or region), utility provider information(e.g., an identifier of the electricity provider for the site),historical consumption information associated with the site (e.g.,amount of electricity used over the past 24 hours, 48 hours, 7 days, 30days, 2 months, 3 months, 6 months, 1 year, 2 years, etc.), informationassociated with the sensors 134 located at the site 142, authenticationcredentials used to access the client device 130 of BMS interface 138 orBMS 132, layout of the site 142 (e.g., number of rooms, size of rooms,layout of building, etc.), historical weather or climate informationassociated with the site 142, or other information about the site 142that can facilitate identifying or responding to grid events.

The training data 124 can include information used by a model generator118 to train the model 126, such as a machine learning model 126. Thetraining data 124 can include or be based on site data 122 for one ormore sites 142. The training data 124 can include historic site data,energy consumption information, weather information, responses to gridevents, performance information (e.g., amount of energy reductionresponsive to execution of a script to control the BMS 132 responsive toa grid event), information about sensors 134, etc. The model 126 caninclude or refer to a machine learning model training using a machinelearning or statistical technique, such as regression analysis, neuralnetwork, convolution neural network, decision tree, support-vectormachine, or Bayesian network. The model 126 can be customized for a site142, or a category of sites 142, or apply to different types of sites142.

The data processing system 102 can include an interface 104 (orinterface component) designed, configured, constructed, or operationalto communicate with a client device 130, sensors 134, BMS 132, and aremote data source 144 via network 101. The interface 104 can receiveand transmit information using one or more protocols, such as a networkprotocol. The interface 104 can include a hardware interface, softwareinterface, wired interface, or wireless interface. The interface 104 canfacilitate communication between one or more components of the dataprocessing system 102.

The interface 104 can include or provide a user interface, such as agraphical user interface or frontend user interface. The interface 104can provide the user interface or access to a frontend interface viaclient device 130 or other computing device. The interface 104 canreceive data from a client device 130, such as data files generated byrecorder 140. The interface 104 can provide output for presentation via,or control of, the client device 130.

The data processing system 102 can include a script generator 114designed, constructed and operational to generate, construct, orotherwise a script that can execute a sequence of actions at a site 142to control a BMS 132 of the site 142. To do so, the script generator 114can first receive a site identifier associated with the site 142. Thescript generator 114 can generate, establish or configure one or morecustomized scripts for a particular site 142. The script generator 114can receive the site identifier for site 142 via an interface of theclient device 130, or an interface of the data processing system 102.The site identifier can include an alphanumeric identifier or location.The script generator 114, using the site identifier, can perform alookup in site data 122 data structure to identify additionalinformation associated with the site 142.

The site 142 can include a client device 130 that can provide ahuman-machine interface (e.g., BMS interface 138) for the BMS 132 thatcontrols the site 142. The BMS interface 138 can be established orprovided by the provider of the BMS 132. The BMS interface 138 caninclude a UI or GUI that is configured for a user or operator of theclient device 130 of the site 142 to interact or control the BMS 132.

The script generator 114 can identify the sensors 134 installed at thesite 142. The script generator 114 can receive information about thenumber of sensors 134 at the site 142, the types of sensors 134,location of the sensors 134, identifiers associated with the sensors134, or any other information about the sensors 134 that facilitatesgenerating a script or detecting grid events for the site 142. Thescript generator 114 can receive communication information associatedwith the sensors 134 in order to communicate or interface with thesensors 134. For example, the script generator 114 can receive ininternet protocol (“IP”) address for the sensors in order to transmit orreceive data packets with the sensors 134. The data packets transmittedfrom the data processing system 102 to the sensors 134 can include arequest or query for sensor information. The data packets transmittedfrom the sensors 134 to the data processing system 102 can includesensors information, readings, measurements, or status information, forexample. The sensors 134 can be configured with an IP address of thedata processing system 102 or other communication information totransmit data packets to the data processing system 102 containingsensor information.

The script generator 114 can generate a prompt for a user or operator ofthe site 142 to input or enter information about the sensors 134. Typesof sensors 134 can include, for example, occupancy sensor, temperaturesensor, humidity sensor, actuator sensor, or fan speed sensor. Thescript generator 114 can generate a prompt for a user or operator of thesite 142 to input or enter information about a configuration of the site142. The configuration of the site 142 can include, for example, thetype of building, size of the building, layout of the building, rooms inthe building, or any other site data 122 that facilitates identifyinggrid events or responding to grid events for the site 142. Inimplementations, the script generator 114 can obtain the configurationinformation from the site data 122.

The configuration can indicate information about utility consumption atthe site 142. The configuration can indicate the number or types ofcomponents that use power, such as electricity, at the site 142. Forexample, the configuration can include heating information, ventilationinformation, cooling information, fan speed information, or damperinformation. The heating information can indicate the type of heatingsystem that is at the site 142, the size of the heating system, theamount of power consumed by the heating system, or other information.For example, the type of heating system can be radiant heat, forced hotair, gas heat, oil heat, or electric heat. The type of cooling systemcan be air conditioning that uses electricity. Ventilation informationcan include the number of dampers, fans or actuators and their actuationor variability. The configuration can include information about thenumber of heating or cooling zones at the site 142. The configurationcan include information about occupancy levels at different regions orzones in the building. Thus, the data processing system 102 can use theconfiguration information and the sensor information to determine how tomodify or reduce load at the site 142.

Based on the configuration and sensor information, the script generator114 can identify one or more load modification measures for the site142. Load reduction measures can refer to how the electrical load of thesite can be modified. The electrical load of the site 142 can bemodified by adjusting a parameter of the BMS 132 managing the site 142.To modify the electrical load, one or more actions can be performed onthe BMS interface 138 to adjust the parameter of the BMS 132.Identifying load modification measures for the site 142 can includeidentifying an event that can trigger one or more actions to adjust aparameter of the BMS 132 to result in the desired modification of thesite.

The event can refer to a trigger or condition that responsive to whichthe data processing system 102 determines to modify a load of the site.For example, types of event can include an occupancy-based trigger,demand response event, pre-heating event, pre-cooling event, coincidentpeak events, abnormally high energy demand events, increased priceevent, or a decreased price event. The events can include, correspondto, or be triggered responsive to periods of high energy prices, demandcharges assessed by the utility provider for the site, or based ongreenhouse gas optimization for when polluting power plants (e.g.,natural gas peaking power plants) are brought online when there is highdemand on the grid. The events can be to reduce the amount of energy bythe site 142 during a given time interval, or to reduce overall energyconsumption. One or more types of events can be detected or identifiedin real-time. One or more types of events can be predicted or forecastedusing a model 126.

The data processing system 102 can determine the events based on theremote data sources 144 that are available or accessible to the dataprocessing system 102 via network 101. For example, a remote data source144 can indicate (e.g., via an electronic notification or message) thata peaking power plants has been brought online to generate and supplypower on the electric distribution grid from which the site 142 receiveselectricity. In another example, the remote data source 144 can indicatea period of high energy prices, or demand charges. The data processingsystem 102 can determine the events based on the types of remote datasources 144 or types of information provided by the remote data sources144 for the site 142. For example, if a type of information is weatherinformation for the site 142, then the data processing system 102 canuse the weather information to generate an event. If a remote datasource 144 can provide the sun level or solar intensity at the site 142at a particular time of day or moment, then the data processing system102 can identify a sun-based event (e.g., if the solar intensity isdetermined or predicted to be high, then open or close window shades atthe site to increase or decrease the temperature without using heatingor cooling elements at the site 142.

The script generator 114 can include a model generator 118 designed,constructed and operational to train a model 126 using training data 124(or training data). The model generator 118 can train the model 126using training data or training data 124 to identify or predict events,such as demand response events or price per kwh rate increases based onvarious data points (e.g., from remote data sources 144), such as seasonof the year, time of day, day of the week, date, weather conditions,temperature, occupancy in building, meetings booked, traffic patterns,or current demand or power usage. The model 126 can be trained topredict the occurrence of an event and generate a trigger to causeselection and execution of a corresponding script to modify load of thesite 142.

The model generator 118 can generate or train the model 126 using amachine learning technique. The model generator 118 can use any type ofmachine learning technique, including, for example, supervised learning,unsupervised learning, or reinforcement learning. The model generator118 can use functions such as linear regression, logistic regression, adecision tree, support vector machine, Naïve Bayes, k-nearest neighbor,k-means, random forest, dimensionality reduction function, or gradientboosting functions.

The model generator 118 can use a training data set to train the model.The training data set can include site data 122 associated with one ormore sites 142, constraints, events, loads. The model 126 can betraining to identify events for which load can be modified or reducedbased on given set of constraints for a site 142, or given set ofsensors available for a site 142. The training data can classify sitedata and constraints with events that can result in a desired loadmodification for the site 142.

The data processing system 102 can use the model 126 to determine whatadjustment to make to a parameter of the site 142 or BMS 132 in order tomodify the load of the site. For example, the model 126 can be trainedwith training data that can indicate how certain adjustments toparameters impacts the load of the site 142. Thus, the data processingsystem 102 can use the model 126 to identify or detect an adjustment toa parameter for the site 142 responsive to a grid event. The dataprocessing system 102 can determine, via the model 126, an adjustment tothe one or more parameters responsive to an event based on theconstraints for the site, the sensors for the site, and historicalelectrical load for the site. Based on the adjustment to the parameteroutput by the model 126, the data processing system 102 can configure ascript with a sequence of actions that modify or reduce electrical loadfor the site responsive to the trigger event.

Thus, the data processing system 102 can identify one or more events tocause load modification measures for the site 142 based on the sensor134 information (e.g., the types of sensors 134 that are available atthe site to provide sensor information) and the configurationinformation for the site 142 (e.g., the types of electrical ormechanical equipment that can be controlled at the site 142 in order toreduce energy consumption).

The data processing system 102 can identify how an operator of the BMS132 at the site 142 interacts with the BMS interface 138 to control theBMS 132 in response to the event. The data processing system 102 (e.g.,via script generator 114 or remote interface controller 112) can detecta sequence of interactions that control one or more parameters of theBMS 132 via the human-machine interface (e.g., BMS interface 138). Insome cases, the data processing system 102 can establish a remote accesssession with the client device 130, and the remote interface controller112 can receive (e.g., via the remote access agent 136 or the recorder140) indications of the user input into the BMS interface 138 and mirroror simulate those interactions in a manner that allows the scriptgenerator 114 to generate a sequence of commands corresponding to thesimulated user input.

The script generator 114 can receive a data file or data feed from theremote interface controller 112 or the recorder 140 that records theinteractions between input devices of the client device 130 and the BMSinterface 138, as well as screenshots of screen grabs of a displaydevice of the client device 130. The screenshots or screen grabs can befor the a particular window having the BMS interface 138 that isrendered by the client device 130, or the entire desktop being presentedvia the client device 130.

For example, the user can access the BMS 132 via a client application,such as a web browser or a dedicated, native BMS client application. Theclient device 130 can also execute other applications simultaneouslywhile executing the application that provides the BMS interface 138. Therecorder 140 (e.g., a macro recorder) can obtain screenshots with one ormore applications execute presented or rendered on the client device130.

The script generator 114 can receive the recording from the clientdevice 130 and the corresponding screenshots. The script generator 114can parse the recording and the screenshots to identify or determinewhat parameters were controlled by the user. Parameters can include, forexample, one or more of adjusting a temperature setpoint, changing fanspeed, changing a damper, changing a lighting configuration, or anyother parameter or function controlled by the BMS 132.

The script generator 114 can generate a script that can replay thedetected sequence of actions. For example, the script generator 114 cangenerate a script using JavaScript, Python, Jython or other libraries toautomate GUI interaction using image patterns to direct keyboard ormouse interactions. A script library can include a portion configured todeliver keyboard and mouse events to appropriate locations on a GUI, andan engine (e.g., a C++ engine) that searches given image patterns on thescreen. The script generator 114 can configure a script to replay thedetected sequence of interactions into the BMS interface.

For example, the generated script can indicate a location on the GUI ofthe BMS interface 138 at which to provide a mouse input (e.g., single ordouble right or left mouse click). The script can indicate a location onthe GUI of the BMS interface 138 at which to provide a keyboard input(e.g., alphanumeric input, lowercase, uppercase, or symbols). Thegenerated script can determine the location at which to enter thekeyboard or mouse input using the image patterns generated from therecorded screenshots. The script can be configured to determine thelocation by comparing a current screenshot of the BMS interface 138 orcurrent state of the foreground applications presented on the clientdevice 130, and comparing that current state with a predetermined statebased on recorded screenshots. Based on the comparison, the script canidentify a location (e.g., a pixel row and column) at which to enterkeyboard or mouse input.

In implementations, the script generator 114 can configure the script toestablish a communication session with the client device 130. The scriptgenerator 114 can configure the script to invoke the BMS 132 or BMSinterface 138. The script generator 114 can configure the script toexecute the sequence of interactions via the human-machine interface ofthe building management system. To establish the communication sessionwith the client device 130, the script generator 114 can conjure thescript with site data 122, such as a site identifier, site IP address,authentication credentials, login credentials, etc. The script can usethe site data 122 or access credentials to establish a communicationsession with the client device 130, such as via a remote access agent136. The remote access agent 136 can be configured to authenticate andestablish the communication session with the data processing system 102and receive the script from the data processing system 102.

The script can include instructions to invoke, launch, or otherwisebring to the foreground the BMS interface 138. Such instructions caninclude invoking a terminal on the client device 130 and inputting apath and filename for the BMS interface 138, triggering a shortcut orcommand to launch the BMS interface 138, or selecting an icon for theBMS located on the desktop or in a menu or toolbar. The script can usean image pattern of the icon to determine the location of the icon. Uponlaunching or otherwise invoking the BMS interface 138, the script canexecute the sequence of interactions with the BMS interface 138.

Since there may be other applications executing on the client device 130that can interface with execution of the script to interact with the BMSinterface 138, the script generator 114 can include an exception handler116 designed, constructed and operational to integrate exceptionhandling into the generated script. An exception can refer to anoccurrence on the client device 130 that can prevent the script fromproperly executing the sequence of commands. For example, an exceptioncan include a prompt or window from an application executing on theclient device 130 that is different from the BMS interface 138 cominginto the foreground or obfuscating a portion of the BMS interface 138such that the script enters a keyboard or mouse input into the prompt ofthe different application as opposed to the BMS interface 138. This canresult in the sequence of interactions partially or fully not beingexecuting in the BMS interface 138, which can result in erroneous orincorrect control of the BMS 132. For example, rather than inputting thecorrect temperature setpoint, the script can enter the wrong temperaturesetpoint or not adjust the temperature setpoint, thereby either notmodifying the load of the site, or incorrectly modifying the load of thesite 142 (e.g., increasing power consumption when the intent of thescript may have been to reduce load).

The exception handler 116 can detect exceptions using the screenshots orscreengrabs obtained by the recorder 140. The exception handler 116 canidentify an exception as a prompt from an electronic mail applicationexecuting on the client device 130, the operator or user of the clientdevice 130 navigating to a different application, or web page in the webbrowser, launching an incorrect application, etc. Exceptions can includeautomatic software updates performed by an operating system of theclient device 130, or an automatic software updated pushed by the BMS132. Exceptions can include the BMS 132 not being available oraccessible to the client device 130, which can be a result of an erroron the server hosting the BMS 132, network connection issues (e.g.,wireless router or issues related to the internet service provider), orprogram crashes on the client device 130. Exceptions can include thestate of the BMS interface 138 not being as expected, such as a manualoverride at the site 142 (e.g., emergency fire situation where the firedepartment disables the BMS 132 for the site using a manual control orswitch).

To identify an exception, the exception handler 116 can be configuredwith predetermined images or patterns that correspond to the desiredscreen or image at which point a keyboard or mouse input is to beentered. The exception handler 116 can use image recognition to comparethe current state with a predetermined state to detect a difference orexception. For example, if the current state includes an e-mail messagenotification overlapping with an input text field on the BMS interface138 in which a new temperature setpoint is to be input by the script,then the exception handler 116 can be configured to either inject apause or delay to wait for the prompt to disappear, or inject a secondsequence of actions to close the notification or select the BMSinterface 138 in order to bring the BMS interface 138 to the foreground.Thus, the script generator 114 can update the script to address theexception by removing the exception, thereby improving the reliabilityand accuracy of the script without causing erroneous operation of theBMS 132 for the site 142.

The exceptions can be identified and addressed by the exception handler116 based on the data files recorded by the recorder 140 that includesthe interactions performed by the operator on the BMS interface 138. Insome cases, the exception handler 116 can identify exceptions in therecorded interactions and prevent any interactions associated with theexceptions from being programed into the script. For example, if theoperator navigated to a news website while the recorder 140 wasrecording the operator changing a temperature setpoint, the exceptionhandler 116 can remove the interactions associated with navigating tothe news website based on the news website not matching a predeterminedimage pattern with the BMS interface 138. In some cases, the exceptionhandler 116 can use that exception to generate an exception handlingsequence of events to navigate back to the BMS interface 138.

The script generator 114 can generate the script to confirm the state ofthe BMS interface 138 is the desired state prior to entering keyboard ormouse input into the BMS interface 138. The script generator 114 cangenerate a status check or state check script that can access the BMSinterface 138 to determine a current state of electrical and mechanicalequipment controlled or monitored by the BMS 132, and compare thecurrent state with a predetermined state or image pattern. The dataprocessing system 102 can execute this status or state check scriptbased on a predetermined interval, such as hourly, every half hour,every 15 minutes, every 10 minutes, or other time interval. In somecases, the script can be configured to run prior to executing a scriptto adjust a parameter of the BMS 132 so as to prevent erroneousadjustments.

The script generator 114 can associate the script with a trigger event.The trigger event can cause execution of the script. The data processingsystem 102 can execute the script in response to the trigger event. Thedata processing system 102 can execute the script in real-time, whichcan include or refer to launching the script within a time interval ofdetecting the trigger event. The time interval can be, for example, 1second, 2 seconds, 5 seconds, 10 seconds, 30 seconds, 1 minute, 5minutes, 10 minutes, or other time interval that is responsive to thegrid event.

One or more script can be associated with one or more events. In somecases, a script can be customized for a particular event. In some cases,the script can be customized based on the event as well as otherconstraints associated with the site 14. The script can be customizedbased on state information associated with the BMS 132 at a currenttime. The state information can include or refer to the current state ofthe electrical and mechanical equipment located at the site 142 that isbeing managed, controlled, or monitored by the BMS 132. For example, thestate information can include the current temperature setpoint for azone of the site 142, current fan speed, current damper level, currenthumidity setting, etc.

The trigger event can include, for example, an indication from theutility provider or other remote data source 144 to reduce energyconsumption for a time interval. The indication can be due to anincrease in demand relative to supply of electric power, which can causea price per kwh rate increase for the time interval or, of notcontrolled, can exceed the total available power supply of the utilityprovider and result in failure of the utility grid (e.g., brownouts,blackouts, or load shedding). Responsive to the trigger event, the dataprocessing system 102 can select the corresponding script that canmodify the load of the site 142.

The data processing system 102 can validate the script prior toactivating the script. Validating the script can refer to or includedetermining that the script performs the desired function. For example,if the objective of the script is to modify the load the site 142 (e.g.,either reduce or increase the load), then the data processing system 102can confirm that the script, when executed, modifies the load of thesite 142 accordingly. If the script does not modify the load of the site142 as desired, then the data processing system 102 can determine to notactivate the script. By preventing activation of scripts that do notrealize the desired load modification for the site 142, the dataprocessing system 102 can reduce unnecessary processing, networkbandwidth, or memory resources by not storing and executing erroneous orinvalid scripts. Further, by not activating scripts that may notfunction as desired, the data processing system 102 can prioritize othervalid scripts that have the desired impact on the load of the site 142.For example, the data processing system 102 can prioritize scripts thatmodify the load of the site 142 for execution, thereby resulting in amore timely and reliable load modification.

In an illustrative example of script validation, the data processingsystem 102 can determine a first electrical load of the site 142 priorto a trigger event or test trigger event. If the test trigger event is ademand response event for which the load of the site is to be reduced,the data processing system 102 can select a script that can reduce theload. The data processing system 102 can determine current constraintsof the site, such as temperature setpoint minimum and maximums,occupancy, and CO₂ maximum levels to select a script that can adjust adamper level in an attempt to reduce the load. A damper can be a valveor plate that stops or regulates the flow of air inside a duct, chimneyor other air-handling equipment. Opening the damper can allow air flowto flow fully, whereas closing the damper can stop the flow of air. Thescript, in an attempt to reduce load, can close the damper from 18% to16% in attempt to reduce energy usage by reducing the outside hot airfrom entering and reducing the amount of air conditioning. However,closing the damper by 2% may not have any noticeable or appreciableimpact on the inside air temperature or reducing the amount of necessaryair conditioning for a particular zone because other factors (e.g.,amount of occupancy in the room) may play a more significant role. Or,closing the damper may have the inadvertent consequence of increasingthe CO₂ levels in the zone of interest that has a higher occupancy atthe moment, which can cause the fan speed to increase in order tocirculate more air. Thus, the load of the site after executing thescript may not have been reduced at all, or reduced beyond a threshold(e.g., 1% load reduction, 2% load reduction, 3% load reduction, or otherpercentage or amount), or may actually be increased, therebyinvalidating the script. The data processing system 102 can determine toinvalidate, or block activation or deactivate the script based on thescript not having the desired load reduction.

In some cases, the data processing system 102 can adjust parameters ofthe script, such as the damper level, in an attempt to generate a scriptthat has the desired load modification. If the script has the desiredload modification, for example, reduces load of the site, then the dataprocessing system 102 can validate and activate the script for a triggerevent.

After the script has been generated and activated, the data processingsystem 102 can store the script in script data structure 120. The dataprocessing system 102 can execute the script responsive to a triggerevent. The data processing system 102 can collect data in order todetect a trigger event or grid event responsive to which to modify theload of a site.

The data processing system 102 can include a data collector 106designed, constructed and operational to collect, receive, retrieve orotherwise identify or obtain data that facilitated identifying andresponding to grid events. The data collector 106 can obtain data vianetwork 101 in real-time, based on a time interval, or responsive to arequest, condition, or event. The data collector 106 can receive data orinformation from sensors 134 located at the site 142, or one or moreremote data sources 144. The data collector 106 can receive informationabout a grid event, such as a demand response event, a rate change forkwh (e.g., a price per kwh for a given time interval), or otherinformation from a utility provider. The data collector 106 can receiveweather information from a weather information service.

The data processing system 102 can include an action generator 108designed, constructed and operational to process the data received bythe data collector 106 and generate an action. The action can refer toor include a sequence of actions or commands defined by a script.

The action generator 108 can detect a grid event or other event based onthe data received from the data collector 106. The action generator 108can detect a grid event from a demand response program, which caninclude a utility notifying the site 142 of when and how to modify theload of the site 142. The action generator 108 can detect grid eventsbased on periods of high energy prices, demand charges related to theutility provider and the site, or based on greenhouse gas optimizationfor when polluting power plants (e.g., natural gas peaking power plants)are brought online when there is high demand on the grid.

The action generator 108 can use sensor information, site data 122,training data 124, or the model 126 to detect the event. The event canbe a trigger event, an indication, an instruction, a notification, orany other request or indicator to modify a load of the site 142. Theindication of the event can be transmitted by the remote data source 144(e.g., electric utility provider or aggregator), or the data processingsystem 102 can detect (e.g., predict or forecast) the event based onother information, such as weather conditions. The data processingsystem 102 can detect the event by monitoring a real-time price per kwhfor the electric utility being delivered to the site 142 and identifyinga change in the price per kwh for the electric utility. The change inthe price can be an increase or a decrease. The data processing system102 can trigger a grid event based on the price change for theelectricity being greater than a threshold (e.g., an absolute valuebased on a local currency, or a percentage of the current price) or whenthe price exceeds or falls below a threshold.

The action generator 108 can determine, based on the detected event, tomodify an electrical load of a site. The action generator 108 canselect, responsive to the determination to modify the electrical load,one or more parameters for the site to adjust to have the desiredmodification to the electrical load of the site 142. The actiongenerator 108 can identify one or more parameters of a BMS 132 to adjustthat can modify the load of the site 142 in a desired manner, such asincreasing or decreasing the load of the site. The action generator 108can identify parameters such as a temperature setpoint for heating orcooling, fan speed, damper level, humidity level, lighting level, orwindow shades for one or more zones or regions at the site 142.

To determine one or more parameters of the site 142 to adjust to modifythe load of the site 142, the data processing system can use dataassociated with the site (e.g., site data 122) or data collected fromsensors 134 installed at the site 142. The data processing system 102(e.g., via data collector 106) can receive data from sensors 134 thatincludes one or more of temperature information, humidity information,damper information, or fan speed information. The data processing system102 can additional receive information from third-party data sources,such as remote data sources 144, that can include weather information.The data processing system 102 can select the one or more parameters forthe site to adjust based on the sensor information, site data, and theweather information. For example, if the temperature at the site 142 isabove a temperature setpoint, the BMS is set to cool the building, andthe outside temperature is lower than the temperature at the site 142,the data processing system 102 can determine to open a damper to allowoutside air to enter to cool the building, as opposed to having the BMSturn on the air conditioner.

Upon identifying the parameter of the BMS 132 to adjust in order tomodify the load at the site 142, the data processing system 102 candetermine a value to which to adjust the parameter. For example, thedata processing system 102 can identify one or more constraintsestablished for the site 142. Constraints can be stored in site data 122in data repository 128. Constraints can include, for example, minimum ormaximum allowable temperature setpoints, maximum CO₂ levels or other airquality metrics, minimum or maximum fan speeds, minimum or maximumdamper levels, or minimum or maximum humidity levels. The constraintscan be for a one or more time intervals or days of the week.

The data processing system 102 can identify a current value for theparameter (e.g., via a previously run status check script) and thendetermine a new value to which to adjust the parameter that modify theload of the site responsive to the detected grid event. For example, thedata processing system 102 can determine that it is possible to lowerthe temperature setpoint without violating the minimum allowabletemperature setpoint for the site 142, and then set the second value tothe new temperature setpoint.

The action generator 108 can select a script from the scripts repository120 that is responsive to the detected event and can control theidentified one or more parameters. For example, if the event is a demandresponse event to modify the load of the site 142, and the parameter isto adjust the temperature setpoint, the action generator 108 can performa lookup in the script repository 120 to select one or more scripts thatare configured to adjust the temperature setpoint of the BMS 132 via theBMS interface 138 of the client device 130.

The scripts 120 can be generated and stored by the script generator 114.The script generator 114 may have previously generated and stored thescripts 120. Subsequent to generation of the scripts, the actiongenerator 108 can select a script based on one or more constraints forthe site 142, sensor information, or state information associated withthe BMS 132. Thus, the action generator 108 can identify, based on theone or more parameters, a script constructed from previously processedinteractions between a human-machine interface of the buildingmanagement system to adjust the one or more parameters for the site.

The data processing system 102 can include a connection manager 110designed, constructed and operational to establish, via network 101, acommunication session with a remote access agent 136 executed by theclient device 130 of the site 142. The connection manager 110 canreceive an indication from the action generator 108 or other componentof the data processing system 102 as to the IP address or othercommunication identifier of the remote access agent 136 or client device130 in order to initiate a communication session with the remote accessagent 136. The connection manager 110 can use any network protocol ortechnique to establish the communication session, including, forexample, an internet protocol, serial line internet protocol,point-point protocol, point-to-point protocol over Ethernet,point-to-point tunneling, remote access service, remote desktopprotocol, or an IP communication protocol. The connection manager 110can apply network security to the communication security in which thedata packets can be encrypted using, for example, transport layersecurity or other networks protocol.

The data processing system 102 (e.g., using the connection manager 110or other component) can invoke, launch, or otherwise access the BMSinterface 138. For example, the data processing system 102 can include aremote interface controller 112 designed, constructed and operational toinput keyboard, mouse or other I/O inputs into the client device 130 inorder to control one or more application executing on the client device130. The remote interface controller 112 can instruct the remote accessagent 136 to input keyboard, mouse, or other commands. The remote accessagent 136 can simulate user input at the client device 130. The remoteaccess agent 136 can take screenshots or screen grabs (e.g., viarecorder 140) and provide the screen capture information to the dataprocessing system 102 for processing and generation of commands.

The remote interface controller 112 can use the selected script togenerate a sequence of commands defined by the script. The sequence ofcommands can adjust the one or more parameters for the site 142 tomodify the electrical load of the site. The remote interface controller112 can transmit a command to the remote access agent 136 in accordancewith the script to cause the remote access agent 136 to perform thecommand to simulate user input (e.g., keyboard, mouse, touch interfaceor other user input). The commands can cause the remote access agent 136to execute the sequence of commands the BMS interface 138, which canrefer to a human-machine interface of the BMS 132.

The data processing system 102 can, via the remote interface controller112 or data collector 106, obtain state information associated with theBMS 132 for the electrical and mechanical components the BMS 132controls. The data processing system 102 can obtain the stateinformation based on a time interval (e.g., every 10 minutes, 15minutes, 30 minutes, 1 hour, 2 hours, 3 hours, etc.), based on an event,trigger or condition, or responsive to a request. In some cases, thedata processing system 102 can determine to execute the status checkscript at a time when a script to adjust parameters of the BMS 132 isnot being run so as not to interfere or detract from adjusting theparameter.

The remote interface controller 112 can execute a status check script.The status check script can include a sequence of commands to establisha connection or communication session with the remote access agent 136.The data processing system 102, via execution of the sequence ofcommands of the status check script, can instruct the remote accessagent 136 to launch or otherwise invoke or bring to the foreground theBMS interface 138. The data processing system 102 can instruct theremote access agent 136 to obtain a screen shot of the BMS interface 138and provide the screenshot back to the data processing system 102 forprocessing. If the BMS interface 138 includes multiple screens, tabs, orwindows containing state information that is displayed at single time,the status check script can be configured to simulate user input at theclient device 130 to cycle through the various screens of the BMSinterface 138 and take screenshots of each for transmission to the dataprocessing system 102. Thus, the data processing system 102 can obtainstatus information or state information of the electrical and mechanicalcomponents controlled by the BMS 132, as well as state information forthe BMS 132. The data processing system 102 can process the screenshotsto determine the state of the BMS 132. For example, the data processingsystem 102 can use an image recognition technique, optical characterrecognition, pattern recognition, or other image parsing or processingtechnique to determine the state information.

The data processing system 102 can terminate the communication sessionwith the remote access agent 136. The data processing system 102 canterminate the communication session subsequent to transmission of thesequence of commands to the remote access agent 136. For example, theconnection manager 110, which can establish the connection, can receivean indication from the remote interface controller 112 that execution ofthe script has completed and the remote access agent 136 has executedthe sequence of commands defined by the script. The data processingsystem 102 can terminate the communication session so as to reducenetwork bandwidth, reduce security vulnerabilities, or reduce errorsthat may occur on the client device 130 due to conflating input commandsfrom an operator of the client device 130 and the remote access agent136.

In some cases, the communication session can be established such that itautomatically terminates after a predetermined amount of time. Forexample, the communication session can be established with atime-to-live flag that sets the communication session to be open for anamount of time that is sufficient for the remote interface controller112 to transmit the sequence of commands defined by the script. Thetime-to-live for the communication session can be fixed, or dynamicallyset based on the script selected by the action generator 108 responsiveto the grid event, site constraints, and site data. The time-to-live canbe, for example, 5 seconds, 10 seconds, 15 seconds, 30 seconds, 60seconds, or other duration sufficient for the data processing system 102to transmit the sequence of commands to the remote access agent 136. Insome cases, the communication session can be configured to automaticallyterminate after a predetermined number of commands have been sent to theremote access agent 136. The communication session can be terminatedeither by the remote access agent 136, an operator of the client device130, or the data processing system 102 (e.g., via the connection manager110).

The data processing system 102 can execute the status check script toretrieve state information from the BMS 132 via BMS interface 138responsive to termination of the communication session. For example,after the sequence of commands to adjust a parameter of the BMS 132 havebeen transmitted and executed by the remote access agent 136, the dataprocessing system 102 can determine to execute a different sequence ofcommands defined by the status check script to retrieve stateinformation from the building management system in order to validate orconfirm that the parameters of the BMS 132 were adjusted in accordancewith the selected script. If the data processing system 102 confirmsthat the parameters were properly adjusted (e.g., based on a state ofthe BMS interface 138 matching the expected state), then the dataprocessing system 102 can terminate the session and enter a holdingstate until the next grid event is detected. If, however, the dataprocessing system 102 determines that the state of the BMS 132 does notmatch the expected state in accordance with the selected script, thedata processing system 102 can determine to re-execute the selectedscript in an attempt to properly adjust the parameter of the BMS 132 inorder to modify the electrical load of the site 142 in response to thedetected grid event. In some cases, the data processing system 102 cantransmit an alert, notification or other indication to the operator ofthe client device 130 to indicate that the script failed to executeproperly and to instruct the operator to manually make the adjustment tothe BMS 132 so as to modify the load of the site 142.

The data processing system 102 can confirm, after execution of theselected script to modify the load of the site 142, that the actualelectric load of the site 142 has been modified as intended by thescript. The data processing system 102 can receive, from an electricmeter sensor 134, the electric load or electricity consumption of thesite 142 for a first time interval that is prior to execution of thescript, and a second time interval subsequent to execution of thescript. The first and second time intervals can be sufficient induration so as to indicate an electric load of the site 142. Forexample, the first and second time intervals can be 1 minute, 2 minutes,3 minutes, 5 minutes, 10 minutes, 15 minutes, 30 minutes, or other timeinterval that facilitates determining whether the executed script hasreduced the electric load of the site as intended. The data processingsystem 102 can compare the electricity consumption after execution ofthe script with the electricity consumption prior to execution of thescript to confirm whether the electric load of the site 142 was modifiedby the script in the intended manner. The intended modification can be,for example, an increase in electric load, decrease in electric load, oran increase or decrease by a desired amount (e.g., percentage of priorelectric load or amount of kilowatts).

If the data processing system 102 determines that the modification ofthe electric load was not the desired or intended modification (e.g.,the electric load increases when the intent of the script was todecrease the electric load), the data processing system 102 can triggera second event to select a new script to revert the adjusted parameterto the previous setting so as to revert the electric load back to theprior level during the time interval prior to execution of the scriptthat had the unintended modification to the electric load. By doing so,the data processing system 102 can perform error correction or avoidinadvertent modifications to the electric load. In some cases, the dataprocessing system 102 can determine to select a different script in anattempt to modify the load in the originally intended manner responsiveto the grid event that caused execution of the first script. Thedifferent script can cause a different adjustment to the parameter thatwas previously adjusted, or adjust a different parameter. For example,if the first script changed a damper level but that resulted in anincrease in electric load as opposed to the desired reduction, thesecond script can revert the damper level back to the prior level, and athird script can adjust a fan speed instead of the damper level.

The data processing system 102 can generate a log of the execution ofthe script. The log can include a time stamp, date, site identifier,event that triggered the execution of the script, and informationrelated to execution of the script. For example, the log can includeinformation about whether the script successfully executed tocompletion, or whether the execution of the script was not successful.Successful execution can include the script executing the sequence ofcommands to adjust the parameter of the BMS. Unsuccessful execution caninclude the script not performing all of the commands to adjust theparameter of the BMS. Execution can be unsuccessful for various reasons,including, for example, the data processing system 102 losing access tothe remote access agent 136 during execution. The execution can beunsuccessful to do an exception or error occurring on the client device130, such as an application crashing, a prompt obfuscating the BMSinterface, or other issue. The data processing system 102 can store thelog for later processing. For example, the action generator 108 canprocess the log to determine the status of the execution of the script,and then determine whether to re-execute the script or execute anotherscript, or generate an alert or instruction to resolve the logged issue.

FIG. 2 is an illustration of an example operational flow for generatinga script for responding to grid events, in accordance with animplementation. The operational flow 200 can be performed by one or moresystem or component depicted in FIG. 1 or FIG. 7, including, forexample, a data processing system, BMS, BMS interface, sensors, clientdevice, or remote data source. At 202, the data processing system 102can initiate or start remote control. Starting remote control caninclude or refer to an indication to begin generating a scriptconfigured to modify load at a site 142 responsive to a grid event. At204, the connection manager 110 can establish a communication sessionwith the remote access agent 136 executing on a client device 130located at the site 142. The connection manager 110 can start a remoteaccess procedure or protocol to establish the communication session orconnection with the client device 130 via the remote access agent 136.

At 206, the data processing system 102, e.g., via connection manager 110or other component of the data processing system 102, can instruct theremote access agent 136 to invoke, start or otherwise access the BMS 132via the BMS interface 138. The remote access agent 136 can be configuredwith a command, application programming interface, keyboard shortcut, orsimulated user input in order to access the BMS interface 138. Forexample, the remote access agent 136 can simulate a double click on theBMS icon on a desktop of the operating system of the client device 130.After launching the BMS 132, the data processing system 102 can wait apredetermined time interval (e.g., 30 seconds) to allow the BMSinterface 138 to fully launch and be ready to receive input commands.The remote access agent 136 can launch a client application, such as aweb browser, and navigate to a web page for the BMS 132. The remoteaccess agent 136 can input site data including authenticationcredentials in order to access a SaaS or cloud-based version of the BMSinterface 138 via the web browser.

At 208, an operational tunnel between the remote interface controller112 and the BMS 132 can be established. The operational tunnel can referto the data processing system 102 being able to adjust parameters of theBMS 132 via the BMS interface 138 that has been invoked on the clientdevice 130 via the remote access agent 136. The data processing system102 can execute the script with a sequence of actions to adjust to oneor more parameters of the BMS 132 via the remote access agent 136.

At 210, the remote interface controller 112 can receive an indication ofthe interactions between the BMS 132 and the client device 130 executingthe remote access agent 136. The interactions can correspond to userinput. For example, the data processing system 102 can receive theindications from the remote access agent 136 or other macro recorderexecuting on the client device 130 that can detect or identify the userinput and provide the indications of the user input to the dataprocessing system 102 via the operation tunnel. The data processingsystem 102 (e.g., via the remote interface controller 112) can beconfigured to mirror or simulate the operations occurring on site.

At 212, the script generator 114 can generate a script with a sequenceof commands that correspond to the remote interface controller 112mirroring or simulating the user input on site. The remote interfacecontroller 112 can use the sequence of commands to simulate the userinput into the BMS 132, thereby controlling the BMS 132 in a mannersimilar to the operator of the client device 130. At 214, the dataprocessing system 102 can store the script in a data repository forexecution at a later time, such as responsive to a grid event.

FIG. 3 is an illustration of an example operational flow for respondingto grid events using a script, in accordance with an implementation. Theoperational flow 300 can be performed by one or more system or componentdepicted in FIG. 1 or FIG. 7, including, for example, a data processingsystem, BMS, BMS interface, sensors, client device, or remote datasource. At 302, the action generator 108 can generate an instruction oraction to modify the electrical load at the site. The action generator108 can generate the instructions responsive to an event, such as a gridevent. The action generator 108 can select a script responsive to thedetected event, and instruct the remote interface controller 112 toexecute the script to adjust a parameter of the BMS of the site.

At 304, the remote interface controller 112 can start the script. Theremote interface controller 112 can initiate execution of the script. At306, the remote interface controller 112 can identify one or moreparameters, such as the building identifier or site identifier, an IPaddress or other address of a remote access agent for the site, or otherinformation used to establish a remote access session. The remoteinterface controller 112 can identify parameters of the BMS for the siteto adjust to modify the electric load of the site. The remote interfacecontroller 112 can communicate with the connection manager 110 toexecute the communication session.

At 308, the remote interface controller 112 can provide the buildingidentifier or other identifier of the site to the connection manager 110to allow the connection manager to establish a remote accesscommunication session with the client device or remote access agent 136of the site. At 310, the connection manager 110 can establish acommunication session with the remote access agent 136. To do so, theconnection manager 110 can provide authentication information, such as asecurity token, authentication credentials, username, or password, forexample. The connection manager 110 can perform a handshaking processwith the remote access agent 136 to establish a secure communicationsession.

At 312, the remote access agent 136 can launch the BMS 132. The remoteaccess agent 136 can receive an instruction or command from the dataprocessing system 102 to launch the BMS. The remote access agent 136 canperform one or more sequence of actions on the client device 130 tolaunch the BMS 132. Launching the BMS 132 can include accessing a BMSinterface of the BMS 132.

At 314, an operational tunnel between the data processing system 102(e.g., remote access interface controller 112) and the BMS 132 can beestablished. The operational tunnel 314 can refer to a communication orconnection path through which the data processing system 102 can adjusta parameter of the BMS 132. The operational tunnel or path can includethe data processing system 102, the remote access agent 136 executed bythe client device 130, a BMS interface 138 access by the client device130, and the BMS 132 which can be controlled via the BMS interface 138.

At 316, the data processing system 102 can execute instructions, such asone or more sequence of commands to adjust one or more parameters of theBMS 132 for the site. The sequence of commands can be performed throughthe operational tunnel 314 between the remote interface controller 112and the BMS 132. For example, the remote interface controller 112 canprovide an instruction to the remote access agent 136 to simulate a userinput into the BMS interface 138 to control the BMS 132.

At 318, the data processing system 102 can log the execution of thescript. The log can include information about the time the script wasexecuted, what parameters were adjusted using the script, whether therewere any errors, alerts or exceptions during execution of the script,whether the script completed executing or execution was paused orterminated prior to completion, or any other information. The script maynot complete execution for various reasons including, for example, i) aloss in the connection causing the operational tunnel 314 to break; ii)an exception occurring on the client device 130 that the script is notconfigured to handle (e.g., the BMS 132 crashing; a pop-up window beingrendered in the foreground; the user taking over control of the clientdevice 130 or interfering with the remote access agent 136 simulatinguser input); or iii) the client device 130 crashing or losing power andshutting off.

At 320, the status of the execution of the script can be returned to theaction generator 108. The action generator 108 can receive the log filegenerated by the remote interface controller 112. The action generator108 can determine the status of the execution of the script to determinewhether to re-execute the script or execute another script. For example,if the status was unsuccessful, which can be determined based on the logfile indicating there was an error or that execution of the script wasterminated prior to completion, the action generator 108 can determineto re-start the script by returning to ACT 304. The data processingsystem 102 can store the status of the script execution in the datarepository 128, such as in site data 122.

FIG. 4. is an illustration of an example method for generating a scriptfor responding to grid events, in accordance with an implementation. Theoperational flow 400 can be performed by one or more system or componentdepicted in FIG. 1 or FIG. 7, including, for example, a data processingsystem, script generator, BMS, BMS interface, sensors, client device, orremote data source. At ACT 402, the data processing system can identifymeasures for a particular site. Measures can refer to or include loadreduction measures. The load modification measures for the site canrefer to how the electrical load of the site can be reduced or increasedresponsive to an event. Identifying load modification measures can bebased on the HVAC or BMS configuration. Identifying load modificationmeasures can be based on what types of parameters the BMS has for thesite, and the constraints for those parameters. The constraints for theparameters indicate whether or to what extent an adjustment can be madeto the parameter. The data processing system can determine how manyparameters or settings can be adjusted for a site in order to modify theload. The data processing system can further determine types of eventsthat can trigger the modification. The events can be external or basedon an indication from a third party, such as a demand response event.

At 404, the data processing system can map a sequence. The sequence canrefer to or include a sequence of actions or commands that, when taken,adjust the parameter to modify the electrical load of the site (e.g.,reduce the electrical load or increase the electrical load). The dataprocessing system can plan the sequence of actions or the logic sequenceof measures identified at ACT 402 to modify the electrical load. Thedata processing system can plan the logic sequence based on theconstraints established for the site (e.g., temperature setpointconstraints to maintain tenant comfort).

At ACT 406, the data processing system can generate a preliminaryscript. The data processing system can record an operator of the BMSinterface conducting the sequence of actions that adjust the parameterof the BMS in order to modify the electrical load of the site. Forexample, a user can use a keyboard, mouse, or other user interface of aclient device to interact with the BMS via the BMS interface. The dataprocessing system can record the user manually entering input so as togenerate a script that can simulate the user input to make the same orsimilar adjustment to the parameter of the BMS as the operator did. Thedata processing system can use a macro recorder, script generator,remote interface controller or other component or tool to record themanual user input in order to generate the preliminary script.

The data processing system can record the user manually making severaldifferent adjustments to several different parameters. For example, thedata processing system can record the user making some or all of theadjustments identified at ACT 402 that can result in modifications ofthe electrical load at the site.

At ACT 408, the data processing system can calibrate the preliminaryscript. Calibrating the script can include, for example, determiningwhether the script causes the desired modification, identifyingadditional adjustments to the parameter that can improve themodification (e.g., a greater reduction or increase in the electricalload), identifying exceptions in the script and resolving them, oradding exception handling to the script. The data processing system canrefine the script based on constraints, or other factors to facilitateexecuting the script responsive to a grid event.

For example, the data processing system can identify an exception in therecorded interactions used to generate the script. An exception canrefer to a pop-up or other notification that was rendered on the clientdevice during recordation of the script. An exception can include theoperator navigating to an unrelated web page or application (e.g., anelectronic mail application or web site) during the recording. The dataprocessing system can calibrate the script by removing the interactionsor actions associated with the exception from the script.

Exception handling can include identifying potential issues that canprevent the script from accurately and reliably adjusting the parameter,and then including a sequence of commands to resolve the issue. Forexample, if a pop-up window or notification is rendered during executionof the script, the data processing system can include a sequence ofcommands to either close the notification, or wait a predetermine timeinterval to allow the notification to disappear prior to continuing withexecuting the sequence of commands. The script can be configured to takescreenshots and forward screenshots to the data processing system forimage processing to identify a pattern. If the pattern matches thepredetermined pattern corresponding to the BMS interface, then the dataprocessing system can instruct the remote access agent to execute thesequence of actions to adjust the parameter of the BMS. However, if thescreenshot corresponding to an unwanted pop-up window, the dataprocessing system can instruct the remote access agent to close thepop-up window, wait until the pop-up window disappears, or otherwisebring the BMS interface to the foreground.

The data processing system can calibrate the script by using a machinelearning model to identify adjustments to parameters that are differentfrom the manual adjustment made the operator. The machine learning modelcan be trained with training data that includes an indication of theelectric load of the site and values for parameters. The model canpredict how an adjustment to one or more parameters modifies the load ofthe site. The data processing system can use the model to predictadjustments to parameters that modify the electric load beyond what wasrecorded. For example, the damper level was reduced by the operator from18% to 15%, and that resulted in a load reduction, then the dataprocessing system can input this data into the model to determinewhether further reducing the damper to 13% or 10%, if permitted by theconstraints for the site, would also result in the desired loadreduction. If reducing the damper to 10% would result in a further loadreduction, then the data processing system can calibrate the script toadjust the parameter for damper level to 10%, even though the manualrecordation included an adjustment to only 15%, for a particularscenario (e.g., given outside temperature, grid event, occupancy, timeof day, season, etc.).

At ACT 410, the data processing system can test the script. Testing thescript can include executing the script by establishing a remote accesscontrol session, launching the BMS, executing the sequence of actions toadjust the parameter of the BMS, and terminating the session. The dataprocessing system can execute a status check script to determine thestate of the BMS to validate that the parameter was actually adjusted inaccordance with the sequence of commands of the script. The dataprocessing system can generate a log of the execution, and return astatus of the execution of the script. In some cases, the dataprocessing system can simulate execution of the script by establishing avirtual machine simulating the client device and remote access agent soas to adjust parameters without impacting the actual site. In somecases, the data processing system can execute the script with the actualsite, but adjust the script for the purposes of testing to input theparameter adjustment but not perform the final step of activating theadjustment so that the BMS does not actual implement the change, therebyallowing the data processing system to test the script without modifyingthe load of the site.

At ACT 412, the data processing system can evaluate the performance ofthe script. The data processing system can analyze the log of theexecution to determine the status of the execution. The data processingsystem can determine whether the script successfully executed, orwhether there was an error during execution. The data processing systemcan determine whether the script resulted in the desired modification ofthe load of the site. The data processing system can receive additionalsensor information for the site prior to and subsequent to execution ofthe script to determine the change in the electric load of the site. Thedata processing system can determine, based on the change in theelectric load of the site, whether the script resulted in the desiredmodification to the electric load of the site.

At ACT 414, the data processing system can activate the script based onthe performance. The data processing system can activate the script ifthe performance, which can refer to the modification of the electricalload of the site, corresponds to the desired or expected modification.For example, if the script was constructed to reduce electrical load ofthe site, but the result was an increase in electrical load of the siteor no change in the electrical load of the site, then the dataprocessing system can determine to not activate the script. If thescript was constructed to reduce the electrical load of the site, andthe result was a reduction in the electrical load of the site, then thedata processing system can activate the script. Activating the scriptcan refer to storing or saving the script in a data repository of thedata processing system to allow the data processing system to select thescript responsive to a grid event and execute the script.

FIG. 5 is an illustration of an example method for responding to gridevents, in accordance with an implementation. The method 500 can beperformed by one or more system or component depicted in FIG. 1 or FIG.7, including, for example, a data processing system, BMS, BMS interface,sensors, client device, or remote data source. At ACT 502, the dataprocessing system can determine to modify (e.g., reduce or increase) theelectrical load of a site. The data processing system can receive anindication or notification from a third party, such as a utilityprovider, of a demand response event. The data processing system candetermine to reduce the electrical load responsive to a rate change forthe electricity. In some cases, the data processing system can predictor forecast the event, such as based on a model.

At ACT 504, the data processing system can select one or more parametersof the BMS of the site to adjust. The data processing system candetermine the parameters to adjust based on a current state of the site,constraints, and data from sensors. For example, the data processingsystem can determine that reducing a temperature setpoint, fan speed,damper level, or humidity setting can modify the electrical load of thesite. The data processing system can determine which parameters toadjust based on a model or other logic, heuristic, policy, or rule.

At ACT 506, the data processing system can identify or select a scriptthat is configured to adjust the parameter selected at ACT 504. The dataprocessing system can select a script that includes a sequence ofcommands to control a BMS of the site via the BMS interface. The scriptcan simulate user input at a client device of the site used to accessthe BMS. The script can be generated based on previously recorded manualoperator input into a GUI of the BMS.

At ACT 508, the data processing system can establish a communicationsession with a client device of the site. The client device can be usedto control the BMS. The data processing system can establish thecommunication session with a remote access agent executing on the clientdevice. The data processing system can use an identifier, IP address, orother address or identifier of the remote access agent in order tocommunicate with the remote access agent to establish the session.

At ACT 510, the data processing system can generate a sequence ofcommands defined by the selected script at ACT 506 to adjust theparameter identified at ACT 504. The data processing system can generatethe sequence of commands to adjust the a parameter to a desired value.The data processing system can execute the script to generate thecommands. The commands can simulate user input to control the BMS.

At ACT 512, the data processing system can transmit the sequence ofcommands to the client device. The remote access agent executing on theclient device can receive the sequence of commands, and simulate userinput in accordance with the sequence of commands. The simulate userinput can be provided to the BMS interface and adjust the parameter ofthe BMS. After transmitting the commands to adjust the BMS, the dataprocessing system can terminate the communication session with theremote access agent. The data processing system can generate a log ofthe execution of the script with information associated with theexecution of the script, including, for example, a site identifier, atime stamp, date stamp, duration of the execution, trigger event,parameter information, and status of the execution.

FIG. 6 is an illustration of an example method for generating script forresponding to grid events, in accordance with an implementation. Theoperational flow 600 can be performed by one or more system or componentdepicted in FIG. 1 or FIG. 7, including, for example, a data processingsystem, BMS, BMS interface, sensors, client device, or remote datasource. At ACT 602, the data processing system can receive a siteidentifier. The data processing system can receive site information thatcan include a unique identifier of the site, location of the site,configuration of the site, or other site data. At ACT 604, the dataprocessing system can identify the types of sensors configured at thesite. The sensors can be sensors established or installed by an operatoror administrator of the data processing system. The sensors can beinterne of things (“IOT”) sensors. The sensors can be configured totransmit information via a network to the data processing system. Thedata processing system can identify the types of sensors, and where theyare installed at the site. The data processing system can receive asensor configuration file, or other input with the sensor information.In some cases, the data processing system can ping or poll the sensorsvia the network to determine sensor information. In some cases, thesensors can push information to the data processing system.

At ACT 606, the data processing system can determine events for thesite. Events can include what can trigger modification of the load atthe site, and what measures to take to modify the load of the site. Forexample, based on the configuration of the site (e.g., type of HVACsystem, BMS, sensors, and available third party information from remotedata sources), the data processing system can determine what types ofevents (e.g., grid events, demand response events, rate changes, weatherinformation, traffic information, etc.) can trigger load modification,as well as what types of parameters (e.g., temperature setpoints,humidity level, fan speed, damper level, carbon dioxide setpoint, windowshades, etc.) can be adjusted in order to modify the electrical load forthe site.

At ACT 608, the data processing system can detect or record a sequenceof interactions for each of the events identified at ACT 606. Thesequence of interactions can be performed by an operator of a BMS thatmanages the site. The sequence of interactions can include user inputinto a graphical user interface or other user interface of the BMS. Theuser interface of the BMS can be accessed by a client device. The dataprocessing system can detect or record a sequence of interactions foreach type of parameter or each adjustment to a parameter. For example,if an event is to reduce the load for the site, the data processingsystem can record one or more ways of reducing the load for the sitebased on adjustment of one or more parameters of the site. For example,the data processing system can record adjustments to the temperaturesetpoint, damper level, humidity level, fan speed, window shades, orother parameter adjustments. The data processing system can record aseparate sequence of interactions for each parameter. The dataprocessing system can record the sequence of interactions using a macrorecorder or other program, script, component or tool executing on theclient device that access

At ACT 610, the data processing system can configure a script. The dataprocessing system can generate or configure a script with the sequenceof interactions. The data processing system can generate separatescripts for each parameter or each adjustment to the parameter. The dataprocessing system can generate one or more scripts to adjust one or moreparameters. The script can be configured to establish a communicationsession with the client device of the site, launch the BMS, and simulatethe user input to adjust the parameter defined by the script.

At ACT 612, the data processing system can generate a trigger for thescript. The trigger can correspond to a grid event responsive to whichthe script can modify the load of the site. The trigger event caninclude, for example, a demand response event, peak coincidence event,rate increase or decrease, or other grid event. The data processingsystem can associate the script with the trigger event such that thedata processing system can select, responsive to the grid event, thescript in order to modify the electrical load of the site by adjustingthe parameter defined by the script.

FIG. 7 is a block diagram of an example computer system 700. Thecomputer system or computing device 700 can include or be used toimplement the system 100, or its components such as the data processingsystem 102. The computing system 700 includes a bus 705 or othercommunication component for communicating information and a processor710 or processing circuit coupled to the bus 705 for processinginformation. The computing system 700 can also include one or moreprocessors 710 or processing circuits coupled to the bus for processinginformation. The computing system 700 also includes main memory 715,such as a random access memory (RAM) or other dynamic storage device,coupled to the bus 705 for storing information, and instructions to beexecuted by the processor 710. The main memory 715 can be or include thedata repository 128. The main memory 715 can also be used for storingposition information, temporary variables, or other intermediateinformation during execution of instructions by the processor 710. Thecomputing system 700 may further include a read only memory (ROM) 720 orother static storage device coupled to the bus 705 for storing staticinformation and instructions for the processor 710. A storage device725, such as a solid state device, magnetic disk or optical disk, can becoupled to the bus 705 to persistently store information andinstructions. The storage device 725 can include or be part of the datarepository 128.

The computing system 700 may be coupled via the bus 705 to a display735, such as a liquid crystal display, or active matrix display, fordisplaying information to a user. An input device 730, such as akeyboard including alphanumeric and other keys, may be coupled to thebus 705 for communicating information and command selections to theprocessor 710. The input device 730 can include a touch screen display735. The input device 730 can also include a cursor control, such as amouse, a trackball, or cursor direction keys, for communicatingdirection information and command selections to the processor 710 andfor controlling cursor movement on the display 735. The display 735 canbe part of the data processing system 102, the client device 130 orother component of FIG. 1, for example.

The processes, systems and methods described herein can be implementedby the computing system 700 in response to the processor 710 executingan arrangement of instructions contained in main memory 715. Suchinstructions can be read into main memory 715 from anothercomputer-readable medium, such as the storage device 725. Execution ofthe arrangement of instructions contained in main memory 715 causes thecomputing system 700 to perform the illustrative processes describedherein. One or more processors in a multi-processing arrangement mayalso be employed to execute the instructions contained in main memory715. Hard-wired circuitry can be used in place of or in combination withsoftware instructions together with the systems and methods describedherein. Systems and methods described herein are not limited to anyspecific combination of hardware circuitry and software.

Although an example computing system has been described in FIG. 7, thesubject matter including the operations described in this specificationcan be implemented in other types of digital electronic circuitry, or incomputer software, firmware, or hardware, including the structuresdisclosed in this specification and their structural equivalents, or incombinations of one or more of them.

The subject matter and the operations described in this specificationcan be implemented in digital electronic circuitry, or in computersoftware, firmware, or hardware, including the structures disclosed inthis specification and their structural equivalents, or in combinationsof one or more of them. The subject matter described in thisspecification can be implemented as one or more computer programs, e.g.,one or more circuits of computer program instructions, encoded on one ormore computer storage media for execution by, or to control theoperation of, data processing apparatuses. Alternatively or in addition,the program instructions can be encoded on an artificially generatedpropagated signal, e.g., a machine-generated electrical, optical, orelectromagnetic signal that is generated to encode information fortransmission to suitable receiver apparatus for execution by a dataprocessing apparatus. A computer storage medium can be, or be includedin, a computer-readable storage device, a computer-readable storagesubstrate, a random or serial access memory array or device, or acombination of one or more of them. While a computer storage medium isnot a propagated signal, a computer storage medium can be a source ordestination of computer program instructions encoded in an artificiallygenerated propagated signal. The computer storage medium can also be, orbe included in, one or more separate components or media (e.g., multipleCDs, disks, or other storage devices). The operations described in thisspecification can be implemented as operations performed by a dataprocessing apparatus on data stored on one or more computer-readablestorage devices or received from other sources.

The terms “data processing system” “computing device” “component” or“data processing apparatus” encompass various apparatuses, devices, andmachines for processing data, including by way of example a programmableprocessor, a computer, a system on a chip, or multiple ones, orcombinations of the foregoing. The apparatus can include special purposelogic circuitry, e.g., an FPGA (field programmable gate array) or anASIC (application specific integrated circuit). The apparatus can alsoinclude, in addition to hardware, code that creates an executionenvironment for the computer program in question, e.g., code thatconstitutes processor firmware, a protocol stack, a database managementsystem, an operating system, a cross-platform runtime environment, avirtual machine, or a combination of one or more of them. The apparatusand execution environment can realize various different computing modelinfrastructures, such as web services, distributed computing and gridcomputing infrastructures. For example, data collector 106, actiongenerator 108, connection manage 110, remote interface controller 112,script generator 114, and other data processing system 102 componentscan include or share one or more data processing apparatuses, systems,computing devices, or processors.

A computer program (also known as a program, software, softwareapplication, app, script, or code) can be written in any form ofprogramming language, including compiled or interpreted languages,declarative or procedural languages, and can be deployed in any form,including as a stand-alone program or as a module, component,subroutine, object, or other unit suitable for use in a computingenvironment. A computer program can correspond to a file in a filesystem. A computer program can be stored in a portion of a file thatholds other programs or data (e.g., one or more scripts stored in amarkup language document), in a single file dedicated to the program inquestion, or in multiple coordinated files (e.g., files that store oneor more modules, sub programs, or portions of code). A computer programcan be deployed to be executed on one computer or on multiple computersthat are located at one site or distributed across multiple sites andinterconnected by a communication network.

The processes and logic flows described in this specification can beperformed by one or more programmable processors executing one or morecomputer programs (e.g., components of the data processing system 102)to perform actions by operating on input data and generating output. Theprocesses and logic flows can also be performed by, and apparatuses canalso be implemented as, special purpose logic circuitry, e.g., an FPGA(field programmable gate array) or an ASIC (application specificintegrated circuit). Devices suitable for storing computer programinstructions and data include all forms of non-volatile memory, mediaand memory devices, including by way of example semiconductor memorydevices, e.g., EPROM, EEPROM, and flash memory devices; magnetic disks,e.g., internal hard disks or removable disks; magneto optical disks; andCD ROM and DVD-ROM disks. The processor and the memory can besupplemented by, or incorporated in, special purpose logic circuitry.

The subject matter described herein can be implemented in a computingsystem that includes a back end component, e.g., as a data server, orthat includes a middleware component, e.g., an application server, orthat includes a front end component, e.g., a client computer having agraphical user interface or a web browser through which a user caninteract with an implementation of the subject matter described in thisspecification, or a combination of one or more such back end,middleware, or front end components. The components of the system can beinterconnected by any form or medium of digital data communication,e.g., a communication network. Examples of communication networksinclude a local area network (“LAN”) and a wide area network (“WAN”), aninter-network (e.g., the Internet), and peer-to-peer networks (e.g., adhoc peer-to-peer networks).

The computing system such as system 100 or system 700 can includeclients and servers. A client and server are generally remote from eachother and typically interact through a communication network (e.g., thenetwork 101). The relationship of client and server arises by virtue ofcomputer programs running on the respective computers and having aclient-server relationship to each other. In some implementations, aserver transmits data (e.g., data packets representing a digitalcomponent) to a client device (e.g., for purposes of displaying data toand receiving user input from a user interacting with the clientdevice). Data generated at the client device (e.g., a result of the userinteraction) can be received from the client device at the server (e.g.,received by the data processing system 102 from the client device 130,sensors 134, or the remote data source 144).

While operations are depicted in the drawings in a particular order,such operations are not required to be performed in the particular ordershown or in sequential order, and all illustrated operations are notrequired to be performed. Actions described herein can be performed in adifferent order.

The separation of various system components does not require separationin all implementations, and the described program components can beincluded in a single hardware or software product. For example, the datacollector 106 and action generator 108 can be a single component, app,or program, or a logic device having one or more processing circuits, orpart of one or more servers of the data processing system 102.

Having now described some illustrative implementations, it is apparentthat the foregoing is illustrative and not limiting, having beenprovided by way of example. In particular, although many of the examplespresented herein involve specific combinations of method acts or systemelements, those acts and those elements may be combined in other ways toaccomplish the same objectives. Acts, elements and features discussed inconnection with one implementation are not intended to be excluded froma similar role in other implementations or implementations.

The phraseology and terminology used herein is for the purpose ofdescription and should not be regarded as limiting. The use of“including” “comprising” “having” “containing” “involving”“characterized by” “characterized in that” and variations thereofherein, is meant to encompass the items listed thereafter, equivalentsthereof, and additional items, as well as alternate implementationsconsisting of the items listed thereafter exclusively. In oneimplementation, the systems and methods described herein consist of one,each combination of more than one, or all of the described elements,acts, or components.

Any references to implementations or elements or acts of the systems andmethods herein referred to in the singular may also embraceimplementations including a plurality of these elements, and anyreferences in plural to any implementation or element or act herein mayalso embrace implementations including only a single element. Referencesin the singular or plural form are not intended to limit the presentlydisclosed systems or methods, their components, acts, or elements tosingle or plural configurations. References to any act or element beingbased on any information, act or element may include implementationswhere the act or element is based at least in part on any information,act, or element.

Any implementation disclosed herein may be combined with any otherimplementation or embodiment, and references to “an implementation,”“some implementations,” “one implementation” or the like are notnecessarily mutually exclusive and are intended to indicate that aparticular feature, structure, or characteristic described in connectionwith the implementation may be included in at least one implementationor embodiment. Such terms as used herein are not necessarily allreferring to the same implementation. Any implementation may be combinedwith any other implementation, inclusively or exclusively, in any mannerconsistent with the aspects and implementations disclosed herein.

References to “or” may be construed as inclusive so that any termsdescribed using “or” may indicate any of a single, more than one, andall of the described terms. References to at least one of a conjunctivelist of terms may be construed as an inclusive OR to indicate any of asingle, more than one, and all of the described terms. For example, areference to “at least one of ‘A’ and ‘B’” can include only ‘A’, only‘B’, as well as both ‘A’ and ‘B’. Such references used in conjunctionwith “comprising” or other open terminology can include additionalitems.

Where technical features in the drawings, detailed description or anyclaim are followed by reference signs, the reference signs have beenincluded to increase the intelligibility of the drawings, detaileddescription, and claims. Accordingly, neither the reference signs northeir absence have any limiting effect on the scope of any claimelements.

The systems and methods described herein may be embodied in otherspecific forms without departing from the characteristics thereof. Theforegoing implementations are illustrative rather than limiting of thedescribed systems and methods. Scope of the systems and methodsdescribed herein is thus indicated by the appended claims, rather thanthe foregoing description, and changes that come within the meaning andrange of equivalency of the claims are embraced therein.

1. A system to respond to electric events, comprising: a data processingsystem comprising memory and one or more processors to: determine, basedon an event, to modify an electrical load of a site, the electrical loadof the site managed by a building management system separate from thedata processing system; select, responsive to the determination tomodify the electrical load, one or more parameters for the site toadjust to modify the electrical load; identify, based on the one or moreparameters, a script constructed from previously processed interactionsbetween a human-machine interface of the building management system toadjust the one or more parameters for the site; establish, via anetwork, a communication session with a remote access agent executed bya computing device of the site to invoke the building management systemof the site; generate a sequence of commands defined by the script thatadjust the one or more parameters for the site to modify the electricalload of the site; and transmit, via the communication session to theremote access agent executed by the computing device of the site, thesequence of commands to cause the remote access agent to execute thesequence of commands on the human-machine interface of the buildingmanagement system to modify the electrical load of the site.
 2. Thesystem of claim 1, wherein the event comprises a demand response event,comprising: the data processing system to receive a notification of thedemand response event from an electric utility provider.
 3. The systemof claim 1, comprising; the data processing system to determine theevent based on a price increase for electricity for a time interval. 4.The system of claim 1, comprising: predict, via a machine learning modeltrained using historical data, an occurrence of the event at a timeinterval; and determine the event based on the predicted occurrence ofthe event at the time interval.
 5. The system of claim 1, comprising thedata processing system to: receive, from a plurality of sensorsinstalled at the site, data associated with the site, the datacomprising at least one of temperature information, humidityinformation, carbon dioxide information, damper information, and fanspeed information; receive, from a remote third-party data source,weather information; and select the one or more parameters for the siteto adjust based on the data and the weather information.
 6. The systemof claim 5, comprising: the data processing system to receive the datafrom the plurality of sensors based on a time interval.
 7. The system ofclaim 1, comprising the data processing system to: determine, based on atime interval, to execute a status check script to retrieve stateinformation for the building management system; establish, responsive tothe determination, a second communication session with the remote accessagent to invoke the building management system; generate a secondsequence of commands defined by the status check script; and transmit,via the second communication session to the remote access agent executedby the computing device of the site, the second sequence of commands tocause the remote access agent to execute the second sequence of commandson the human-machine interface of the building management system toobtain the state information for the building management system.
 8. Thesystem of claim 1, comprising the data processing system to: identifyone or more constraints established for the site; identify a first valueof a first parameter of the one or more parameters; determine, based onthe one or more constraints and the first value, a second value to whichto adjust the first parameter to reduce the electrical load of the siteresponsive to the event; and generate the sequence of commands to causethe remote access agent to input the second value into the human-machineinterface of the building management system.
 9. The system of claim 1,comprising: the data processing system to terminate the communicationsession subsequent to transmission of the sequence of commands to theremote access agent.
 10. The system of claim 1, comprising the dataprocessing system to: subsequent to transmission of the sequence ofcommands to the remote access agent, execute a status check script toretrieve state information from the building management system; andconfirm, based on the state information, the adjustment to the one ormore parameters for the site.
 11. The system of claim 1, comprising thedata processing system to: receive, from a sensor of the site, anindication of the electrical load of the site during a second timeinterval subsequent to transmission of the sequence of commands to theremote access agent; and determine, based on a comparison of theelectrical load of the site during the second time interval with theelectrical load during a first time interval prior to transmission ofthe sequence of commands, a reduction of the electrical load of thesite.
 12. The system of claim 1, comprising the data processing systemto: receive, from a sensor of the site, an indication of the electricalload of the site during a second time interval subsequent totransmission of the sequence of commands to the remote access agent;determine, based on a comparison of the electrical load of the siteduring the second time interval with the electrical load during a firsttime interval prior to transmission of the sequence of commands, anincrease in the electrical load of the site; and generate, responsive tothe increase in the electrical load of the site, a second sequence ofcommands to revert the one or more parameters of the building managementsystem.
 13. The system of claim 1, wherein the computing device of thesite is located remote from the site or at the site.
 14. A method ofresponding to electric events, comprising: determining, by a dataprocessing system comprising memory and one or more processors, based onan event, to modify an electrical load of a site, the electrical load ofthe site managed by a building management system separate from the dataprocessing system; selecting, by the data processing system responsiveto the determination to modify the electrical load, one or moreparameters for the site to adjust to modify the electrical load;identifying, by the data processing system based on the one or moreparameters, a script constructed from previously processed interactionsbetween a human-machine interface of the building management system toadjust the one or more parameters for the site; establishing, by thedata processing system via a network, a communication session with aremote access agent executed by a computing device of the site to invokethe building management system of the site; generating, by the dataprocessing system, a sequence of commands defined by the script thatadjust the one or more parameters for the site to modify the electricalload of the site; and transmitting, by the data processing system viathe communication session to the remote access agent executed by thecomputing device of the site, the sequence of commands to cause theremote access agent to execute the sequence of commands on thehuman-machine interface of the building management system to modify theelectrical load of the site.
 15. The method of claim 14, wherein theevent comprises a demand response event, comprising: receiving, by thedata processing system, a notification of the demand response event froman electric utility provider.
 16. The method of claim 14, comprising;determining, by the data processing system, the event based on a priceincrease for electricity for a time interval.
 17. The method of claim14, comprising: predicting, by the data processing system via a machinelearning model trained using historical data, an occurrence of the eventat a time interval; and determining, by the data processing system, theevent based on the predicted occurrence of the event at the timeinterval.
 18. The method of claim 14, comprising: receiving, by the dataprocessing system from a plurality of sensors installed at the site,data associated with the site, the data comprising at least one oftemperature information, humidity information, damper information, andfan speed information; receiving, by the data processing system from aremote third-party data source, weather information; and selecting, bythe data processing system, the one or more parameters for the site toadjust based on the data and the weather information.
 19. The method ofclaim 14, comprising: determining, by the data processing system basedon a time interval, to execute a status check script to retrieve stateinformation for the building management system; establishing, by thedata processing system responsive to the determination, a secondcommunication session with the remote access agent to invoke thebuilding management system; generating, by the data processing system, asecond sequence of commands defined by the status check script; andtransmitting, by the data processing system, via the secondcommunication session to the remote access agent executed by thecomputing device of the site, the second sequence of commands to causethe remote access agent to execute the second sequence of commands onthe human-machine interface of the building management system to obtainthe state information for the building management system.
 20. The methodof claim 14, comprising: subsequent to transmitting the sequence ofcommands to the remote access agent, executing, by the data processingsystem, a status check script to retrieve state information from thebuilding management system; and confirming, by the data processingsystem based on the state information, the adjustment to the one or moreparameters for the site. 21.-40. (canceled)